The Statistical AutoScheduler schedules Jira epics using story point estimates, confidences \n and blockers between epics. By default, the AutoScheduler works with the setup described in \n Learn Agile Program Management with Jira. \n If your Jira instance is different, you can make those changes here. \n
\n
All configuration changes are saved to the URL. Remember to bookmark this page after your setup is complete.
\n
Epic JQL
\n
\n
\n \n
Specify a JQL used to load the epics you \n want to schedule.
\n {{/ if }}\n {{# if(this.rawIssuesPromise.isPending) }}\n
Loading issues ...
\n {{/ if }}\n
\n
Limit to 100 issues\n
\n \n\n\n
\n
\n
\n JQL is a SQL-like syntax used to load issues. For more information, read JQL Overview.\n Use issuekey in portfolioChildIssuesOf("KEY") to load all issues for a single initiative.
\n
\n
\n
Median Estimate Field(s)
\n
\n
\n \n
What field(s) provide the median estimate?
\n \n
\n
\n
\n The median estimate is the average amount of time the epic will take to complete.\n See Adding Custom Fields\n for how to create a Story points median field.\n
\n
\n
\n\n
Confidence Field(s)
\n
\n
\n \n
What field(s) provide the confidence?
\n \n
\n
\n
\n Confidence is how certain your team feels about the median estimate. \n See the Statistical Software Estimator for a deeper understanding \n on how confidence and median estimate work together. \n See Adding Custom Fields\n for how to create a Story points confidence field.\n
\n
\n
\n\n\n
Adjusted Story Point Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n This AutoScheduler writes to the Adjusted Story Point field the adjusted story points \n combining the median estimate and confidence. This should typically be Jira\'s default Story points\n field. See the Statistical Software Estimator for a deeper understanding \n on how confidence and median estimate work together. \n
\n
\n
\n\n
Start Date Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n The AutoScheduler writes epic start dates to the Start date field.\n This should typically be Jira\'s default Start date field.\n
\n
\n
\n\n
Due Date Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n The AutoScheduler writes epic end dates to the Due date field.\n This should typically be Jira\'s default Due date field.\n
\n
\n
\n\n \n \n Advanced Configuration\n \n
\n
The following configuration allows for complex rules to be provided to the AutoScheduler via \n JsonLogic. If you need help, reach out on Bitovi\'s Discord.\n
\n
Get Team Key
\n
Given an issue, returns a key that represents which team will take on the work.
\n \n \n \n
Get Days Per Sprint
\n
Given a team, returns the number of work days in a sprint.
\n \n \n
Get Confidence
\n
Given an issue, returns the conflidence (from 0-100)
\n \n \n
Get Estimate
\n
Given an issue, returns the amount of work in story points.
\n \n \n
Get Parent Key
\n
Given an issue, returns the container issue\'s key.
\n \n \n \n
Get Blocking Keys
\n
Given an issue, returns an array of keys that the issue blocks.
\n {{/ if }}\n ';static props={work:pr.Any,lastDueDay:Number,showingData:{default:!1},startDate:Date};get startColumns(){return iE(this.work.startDateValues,this.lastDueDay+1,"startDate")}get endColumns(){return iE(this.work.dueDateValues,this.lastDueDay+1,"dueDate")}showProbabilityData(e,t){const n=vw(this.startDate,t.day),r=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:"UTC"}),i=this.work[t.type+"Values"],a=i.findIndex((e=>e>t.day)),o=(-1===a?i.length:a)/i.length,s="startDate"===t.type?"starts before or on":"ends after or on",u="startDate"===t.type?"started":"ended";let c="startDate"===t.type?100*o:100*(1-o);const l="startDate"===t.type?"bg-blue-500":"bg-green-500";eE.belowElementInScrollingContainer(e.currentTarget,`\n
\n
\n
${rE(c,1)}% chance
\n
epic ${s}
\n
${r.format(n)}.
\n
\n
\n
${rE(100*t.totalCount/this.work[t.type+"Values"].length,1)}% of the time,
\n \n \n {{/ for }}\n {{/ for }}\n {{/ }}\n \n\n ';static props={configuration:pr.Any,getVelocityForTeam:Function,updateVelocity:Function,rawIssues:pr.Any,getParallelWorkLimit:Function,workPlans:pr.Any,lastDueDay:{default:1},allWorkItems:pr.Any,totalSimulationsToRun:{default:5e3},totalSyncSimulations:{default:50},simulationPercentComplete:{default:0},velocities:pr.Any,firstRunWorkPlans:{async(e){this.runOneSimulation(e,!0)}},startDate:pr.maybeConvert(Date),endDateWorkItem:null};get gridNumberOfDays(){return this.lastDueDay+1}get timeRanges(){const e=this.gridNumberOfDays,t=vw(this.startDate,e+1);return Ow(this.startDate,t,12)}connected(){this.listenTo("scheduledAllWork",this.insertBlockers.bind(this)),this.listenTo("firstRunWorkPlans",(({value:e})=>{this.afterFirstSimulation(e)})),this.afterFirstSimulation(this.firstRunWorkPlans),this.listenTo("uncertaintyWeight",(({value:e})=>{Fe.batch.start();for(let t in this.allWorkItems){const n=this.allWorkItems[t];n.uncertaintyWeight=e,n.updateStats()}this.endDateWorkItem.uncertaintyWeight=e,this.endDateWorkItem.updateStats(),Fe.batch.stop(),this.insertBlockers()}))}runOneSimulation(e,t){if(!this.configuration||!this.rawIssues.length)return e(void 0);Qw(this.rawIssues,{uncertaintyWeight:80,planIssuesInUncertaintyOrder:!0,probablisticallySelectIssueTiming:!0,onPlannedIssues:e,getVelocity:this.getVelocityForTeam.bind(this),onIgnoredIssues:function(e,t){},getEstimate:this.configuration.getEstimate,getTeamKey:this.configuration.getTeamKey,getParentKey:this.configuration.getParentKey,getConfidence:this.configuration.getConfidence,getParallelWorkLimit:this.getParallelWorkLimit})}afterFirstSimulation(e){if(!e)return;const t=this.endDateWorkItem=new sE({work:{issue:{Summary:"Due Date","Issue key":"Due Date",blocks:[],blocking:[],url:null}},uncertaintyWeight:this.uncertaintyWeight,dueDatesOnly:!0}),n=this.allWorkItems={},r=()=>{let e=0;Fe.batch.start();for(let t in n){const r=n[t];r.updateStats(),e=Math.max(r.dueDateTop95,e)}this.lastDueDay=e+2,t.updateStats(),Fe.batch.stop()},i=()=>{this.dispatch({type:"scheduledAllWork"})},a=(e,t=100)=>{for(let e=0;e0?(this.simulationPercentComplete=(this.totalSimulationsToRun-e)/this.totalSimulationsToRun*100,setTimeout((()=>a(e,t)),1)):(this.simulationPercentComplete=100,i())};function o(e){let r=0,i=null;for(let t in e){const a=e[t].workPlans.plans;for(const e of a)for(const t of e.work){n[t.issue["Issue key"]].addWork(t);const e=t.startDay+t.daysOfWork;e>r&&(r=e,i=t)}}t.addWork(i)}let s=0,u=null;const c=Object.values(e).map((({teamKey:e,velocity:t,workPlans:r})=>({teamKey:e,velocity:t,tracks:r.plans.map((e=>{const t={works:[],workMap:{}};for(const r of e.work){const e=new sE({work:r,uncertaintyWeight:this.uncertaintyWeight,dueDatesOnly:!1});t.workMap[r.issue["Issue key"]]=e,t.works.push(e),e.addWork(r),n[r.issue["Issue key"]]=e;const i=r.startDay+r.daysOfWork;i>s&&(s=i,u=r)}return t})),disableTracks:!1,disableVelocity:!1})));null!==u&&(t.addWork(u),c.unshift({teamKey:"Summary",velocity:null,tracks:[{works:[t],workMap:{SUMMARY:t}}],disableVelocity:!0,disableTracks:!0}),r(),this.workPlans=function(e){let t;const n=e.map(((e,n)=>{const r=t?t.gridRowStart+t.gridRowSpan:2,i=e.tracks.length+e.tracks.reduce(((e,t)=>e+t.works.length),0)+1;let a;const o=e.tracks.map(((e,t)=>a={...e,gridRowStart:a?a.gridRowStart+a.gridRowSpan+1:r+1,gridRowSpan:e.works.length,name:""+(t+1)}));return t={...e,gridRowStart:r,gridRowSpan:i,tracks:o}})),r=n[n.length-1];return n.gridRowSpan=r.gridRowStart+r.gridRowSpan,n}(c),setTimeout((()=>a(this.totalSimulationsToRun,this.totalSyncSimulations)),13))}canRemoveTrack(e,t){return t>1&&0===e}plus(e,t,n=0){return e+t+n}workIndexDependentStyles(e,t){if(e===t-1)return"pb-2"}insertBlockers(){const e=this.getElementsByTagName("svg")[0];e.innerHTML="";const t=e.getBoundingClientRect();e.setAttributeNS(null,"viewBox",`0 0 ${t.width} ${t.height}`);const n=function(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top}}(e),r={};[...this.getElementsByClassName("work-item")].forEach((e=>{this.allWorkItems[e.id]&&(r[e.id]={element:e,work:this.allWorkItems[e.id]})}));for(const{element:t,work:i}of Object.values(r)){const a=i.work.issue.blocks,o=fE(lE(t),n);for(const t of a){const a=cE({d:hE(o,fE(dE(r[t["Issue key"]].element),n))});a.classList.add("path-blocker"),a.id=i.work.issue["Issue key"]+"-"+t["Issue key"],e.appendChild(a)}}}showDependencies(e){vE(e.work.issue,"blocks","blocked",0),vE(e.work.issue,"blockedBy","blocking",0)}hideDependencies(e){gE(e.work.issue,"blocks","blocked",0),gE(e.work.issue,"blockedBy","blocking",0)}}function cE(e){const t=document.createElementNS("http://www.w3.org/2000/svg","path");for(let n in e)t.setAttributeNS(null,n,e[n]);return t}function lE(e){const t=e.getBoundingClientRect();return{x:t.right,y:t.top+t.height/2}}function dE(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top+t.height/2}}function fE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hE(e,t,n=30){return`M ${e.x} ${e.y} \n c ${n} 0, ${t.x-e.x-n} ${t.y-e.y}, ${t.x-e.x} ${t.y-e.y}`}const pE={blockedBy:function(e,t){return document.getElementById(t+"-"+e)},blocks:function(e,t){return document.getElementById(e+"-"+t)}};function vE(e,t,n,r=0){const i=e["Issue key"];(e[t]||[]).forEach((e=>{const a=pE[t](i,e["Issue key"]);a&&a.classList.add(n+"-"+r,"work-"+n),vE(e,t,n,r+1)}))}function gE(e,t,n,r=0){const i=e["Issue key"];(e[t]||[]).forEach((e=>{const a=pE[t](i,e["Issue key"]);a&&a.classList.remove(n+"-"+r,"work-"+n),gE(e,t,n,r+1)}))}function yE(e){return e.ok?e.json():e.json().then((t=>{const n=new Error("HTTP status code: "+e.status);throw Object.assign(n,t),Object.assign(n,e),n}))}function mE(e){return e.ok?e.text():e.json().then((t=>{const n=new Error("HTTP status code: "+e.status);throw Object.assign(n,t),Object.assign(n,e),n}))}function bE(e,t){return fetch(e,t).then(yE)}function wE({JIRA_CLIENT_ID:e,JIRA_SCOPE:t,JIRA_CALLBACK_URL:n,JIRA_API_URL:r}=window.env){let i,a=bE;function o(e){async function t(n,r,i){const a=function(t,n,r){return function(e,t){const n=[];for(let r=0;r{const i=`parent in (${n.map((e=>e.key)).join(", ")})`;return e({...t,jql:i},r)}))}(n,r,i),o=e=>e.length?t(n,e,i).then((t=>e.concat(t))):e,s=a.map((e=>e.then(o)));return(await Promise.all(s)).flat()}return async function(n,r=function(){}){const a=await i,o={...n,fields:n.fields.map((e=>a.nameMap[e]||e))};r.data=r.data||{issuesRequested:0,issuesReceived:0,changeLogsRequested:0,changeLogsReceived:0};const s=await e(o,r),c=await t(o,s,r);return s.concat(c).map((e=>({...e,fields:u(e.fields,a)})))}}const s={saveInformationToLocalStorage:e=>{const t=Object.keys(e);for(let n of t)window.localStorage.setItem(n,e[n])},fetchFromLocalStorage:e=>window.localStorage.getItem(e),fetchAuthorizationCode:()=>{const r=`https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id=${e}&scope=${escape(t)}&redirect_uri=${n}&response_type=code&prompt=consent&state=${encodeURIComponent(encodeURIComponent(window.location.search))}`;window.location.href=r},refreshAccessToken:async e=>{try{const t=await a(`${window.env.JIRA_API_URL}/?code=${e}`),{accessToken:n,expiryTimestamp:r,refreshToken:i}=t.data;return s.saveInformationToLocalStorage({accessToken:n,refreshToken:i,expiryTimestamp:r}),n}catch(e){console.error(e.message),window.localStorage.clear(),s.fetchAuthorizationCode()}},fetchAccessTokenWithAuthCode:async e=>{try{const{accessToken:t,expiryTimestamp:n,refreshToken:r,scopeId:i}=await a(`./access-token?code=${e}`);s.saveInformationToLocalStorage({accessToken:t,refreshToken:r,expiryTimestamp:n,scopeId:i});const o=new URL(window.location).searchParams.get("state");decodeURIComponent(o);location.href="/"+(o||"")}catch(e){console.error(e)}},fetchAccessibleResources:e=>{const t=e||s.fetchFromLocalStorage("accessToken");return a("https://api.atlassian.com/oauth/token/accessible-resources",{headers:{Authorization:`Bearer ${t}`}})},fetchJiraSprint:async e=>{const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken"),i=`${r}/${t}/rest/agile/1.0/sprint/${e}`,o={headers:{Authorization:`Bearer ${n}`}};return await a(i,o)},fetchJiraIssue:async e=>{const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken"),i=`${r}/${t}/rest/api/3/issue/${e}`,o={headers:{Authorization:`Bearer ${n}`}};return await a(i,o)},editJiraIssueWithNamedFields:async(e,t)=>{const n=s.fetchFromLocalStorage("scopeId"),a=s.fetchFromLocalStorage("accessToken"),o=function(e,t){const n={fields:{},update:{}};for(let r in e)n.update[t.nameMap[r]||r]=[{set:e[r]}];return n}(t,await i);return fetch(`${r}/${n}/rest/api/3/issue/${e}?`,{method:"PUT",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then(mE)},fetchJiraIssuesWithJQL:function(e){const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken");return a(`${r}/${t}/rest/api/3/search?`+new URLSearchParams(e),{headers:{Authorization:`Bearer ${n}`}})},fetchAllJiraIssuesWithJQL:async function(e){const{limit:t,...n}=e,r=s.fetchJiraIssuesWithJQL({maxResults:100,...n}),{issues:i,maxResults:a,total:o,startAt:u}=await r,c=[r],l=Math.min(o,t||1/0);for(let e=u+a;ee.map((e=>e.issues)).flat()))},fetchAllJiraIssuesWithJQLUsingNamedFields:async function(e){const t=await i,n={...e,fields:e.fields.map((e=>t.nameMap[e]||e))};return(await s.fetchAllJiraIssuesWithJQL(n)).map((e=>({...e,fields:u(e.fields,t)})))},fetchJiraChangelog(e,t){const n=s.fetchFromLocalStorage("scopeId"),i=s.fetchFromLocalStorage("accessToken");return a(`${r}/${n}/rest/api/3/issue/${e}/changelog?`+new URLSearchParams(t),{headers:{Authorization:`Bearer ${i}`}})},isChangelogComplete:e=>e.histories.length===e.total,fetchRemainingChangelogsForIssues:(e,t=function(){})=>Promise.all(e.map((e=>s.isChangelogComplete(e.changelog)?{...e,changelog:e.changelog.histories}:s.fetchRemainingChangelogsForIssue(e.key,e.changelog).then((t=>({...e,changelog:e.changelog.histories})))))),fetchRemainingChangelogsForIssue(e,t){const{histories:n,maxResults:r,total:i,startAt:a}=t,o=[];o.push({values:t.histories});for(let t=0;t({...e,values:e.values.reverse()}))));return Promise.all(o).then((e=>e.map((e=>e.values)).flat())).then((function(e){return e}))},fetchAllJiraIssuesWithJQLAndFetchAllChangelog:function(e,t=function(){}){const{limit:n,...r}=e;function i(e){return Object.assign(t.data,{issuesReceived:t.data.issuesReceived+e.issues.length}),t(t.data),s.fetchRemainingChangelogsForIssues(e.issues,t)}t.data=t.data||{issuesRequested:0,issuesReceived:0,changeLogsRequested:0,changeLogsReceived:0};const a=s.fetchJiraIssuesWithJQL({maxResults:100,expand:["changelog"],...r});return a.then((({issues:e,maxResults:n,total:o,startAt:u})=>{Object.assign(t.data,{issuesRequested:t.data.issuesRequested+o,changeLogsRequested:0,changeLogsReceived:0}),t(t.data);const c=[a.then(i)];for(let e=u+n;ee.flat()))}))},fetchAllJiraIssuesWithJQLAndFetchAllChangelogUsingNamedFields:async function(e,t){const n=await i,r={...e,fields:e.fields.map((e=>n.nameMap[e]||e))};return(await s.fetchAllJiraIssuesWithJQLAndFetchAllChangelog(r,t)).map((e=>({...e,fields:u(e.fields,n)})))},fetchJiraFields(){const e=s.fetchFromLocalStorage("scopeId"),t=s.fetchFromLocalStorage("accessToken");return a(`${r}/${e}/rest/api/3/field`,{headers:{Authorization:`Bearer ${t}`}})},getAccessToken:async function(){if(s.hasValidAccessToken())return s.fetchFromLocalStorage("accessToken");if(s.fetchFromLocalStorage("refreshToken"))return s.refreshAccessToken();s.fetchAuthorizationCode()},hasAccessToken:function(){return!!s.fetchFromLocalStorage("accessToken")},hasValidAccessToken:function(){const e=s.fetchFromLocalStorage("accessToken");let t=Number(s.fetchFromLocalStorage("expiryTimestamp"));isNaN(t)&&(t=0);return!(Math.floor((new Date).getTime()/1e3)>t||!e)},getServerInfo(){const e=s.fetchFromLocalStorage("scopeId"),t=s.fetchFromLocalStorage("accessToken");return a(`${r}/${e}/rest/api/3/serverInfo`,{headers:{Authorization:`Bearer ${t}`}})}};function u(e,t){const n={};for(let r in e)n[t.idMap[r]||r]=e[r];return n}return s.fetchAllJiraIssuesAndDeepChildrenWithJQLUsingNamedFields=o(s.fetchAllJiraIssuesWithJQL.bind(s)),s.fetchAllJiraIssuesAndDeepChildrenWithJQLAndFetchAllChangelogUsingNamedFields=o(s.fetchAllJiraIssuesWithJQLAndFetchAllChangelog.bind(s)),s.hasValidAccessToken()&&(i=s.fetchJiraFields().then((e=>{const t={},n={};return e.forEach((e=>{n[e.id]=e.name,t[e.name]=e.id})),console.log(t),{list:e,nameMap:t,idMap:n}})),s.fieldsRequest=i),window.jiraHelpers=s}customElements.define("monte-carlo",uE);const EE=new Promise(((e,t)=>{setTimeout((function(){import("./update-epics-5io8PFQ2.js").then(e,t)}),500)}));class kE extends dh{static view='\n \n {{# if(this.showSavingModal)}}\n \n {{/ }}\n \n {{# if(this.loginComponent.isLoggedIn) }}\n\n \n \n \n Configure JQL: {{ this.issueJQL}}\n \n \n\n \n {{ else }}\n
\n The following is a sample plan. Learn more about it in the \n "Agile Program Management with Jira" \n training. Click "Connect to Jira" to load your own data.\n
The Statistical AutoScheduler schedules Jira epics using story point estimates, confidences \n and blockers between epics. By default, the AutoScheduler works with the setup described in \n Learn Agile Program Management with Jira. \n If your Jira instance is different, you can make those changes here. \n
\n
All configuration changes are saved to the URL. Remember to bookmark this page after your setup is complete.
\n
Epic JQL
\n
\n
\n \n
Specify a JQL used to load the epics you \n want to schedule.
\n {{/ if }}\n {{# if(this.rawIssuesPromise.isPending) }}\n
Loading issues ...
\n {{/ if }}\n
\n
Limit to 100 issues\n
\n \n\n\n
\n
\n
\n JQL is a SQL-like syntax used to load issues. For more information, read JQL Overview.\n Use issuekey in portfolioChildIssuesOf("KEY") to load all issues for a single initiative.
\n
\n
\n
Median Estimate Field(s)
\n
\n
\n \n
What field(s) provide the median estimate?
\n \n
\n
\n
\n The median estimate is the average amount of time the epic will take to complete.\n See Adding Custom Fields\n for how to create a Story points median field.\n
\n
\n
\n\n
Confidence Field(s)
\n
\n
\n \n
What field(s) provide the confidence?
\n \n
\n
\n
\n Confidence is how certain your team feels about the median estimate. \n See the Statistical Software Estimator for a deeper understanding \n on how confidence and median estimate work together. \n See Adding Custom Fields\n for how to create a Story points confidence field.\n
\n
\n
\n\n\n
Adjusted Story Point Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n This AutoScheduler writes to the Adjusted Story Point field the adjusted story points \n combining the median estimate and confidence. This should typically be Jira\'s default Story points\n field. See the Statistical Software Estimator for a deeper understanding \n on how confidence and median estimate work together. \n
\n
\n
\n\n
Start Date Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n The AutoScheduler writes epic start dates to the Start date field.\n This should typically be Jira\'s default Start date field.\n
\n
\n
\n\n
Due Date Output Field
\n
\n
\n \n
What field should have the resulting story points?
\n \n
\n
\n
\n The AutoScheduler writes epic end dates to the Due date field.\n This should typically be Jira\'s default Due date field.\n
\n
\n
\n\n \n \n Advanced Configuration\n \n
\n
The following configuration allows for complex rules to be provided to the AutoScheduler via \n JsonLogic. If you need help, reach out on Bitovi\'s Discord.\n
\n
Get Team Key
\n
Given an issue, returns a key that represents which team will take on the work.
\n \n \n \n
Get Days Per Sprint
\n
Given a team, returns the number of work days in a sprint.
\n \n \n
Get Confidence
\n
Given an issue, returns the conflidence (from 0-100)
\n \n \n
Get Estimate
\n
Given an issue, returns the amount of work in story points.
\n \n \n
Get Parent Key
\n
Given an issue, returns the container issue\'s key.
\n \n \n \n
Get Blocking Keys
\n
Given an issue, returns an array of keys that the issue blocks.
\n {{/ if }}\n ';static props={work:pr.Any,lastDueDay:Number,showingData:{default:!1},startDate:Date};get startColumns(){return iE(this.work.startDateValues,this.lastDueDay+1,"startDate")}get endColumns(){return iE(this.work.dueDateValues,this.lastDueDay+1,"dueDate")}showProbabilityData(e,t){const n=vw(this.startDate,t.day),r=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:"UTC"}),i=this.work[t.type+"Values"],a=i.findIndex((e=>e>t.day)),o=(-1===a?i.length:a)/i.length,s="startDate"===t.type?"starts before or on":"ends after or on",u="startDate"===t.type?"started":"ended";let c="startDate"===t.type?100*o:100*(1-o);const l="startDate"===t.type?"bg-blue-500":"bg-green-500";eE.belowElementInScrollingContainer(e.currentTarget,`\n
\n
\n
${rE(c,1)}% chance
\n
epic ${s}
\n
${r.format(n)}.
\n
\n
\n
${rE(100*t.totalCount/this.work[t.type+"Values"].length,1)}% of the time,
\n \n \n {{/ for }}\n {{/ for }}\n {{/ }}\n \n\n ';static props={configuration:pr.Any,getVelocityForTeam:Function,updateVelocity:Function,rawIssues:pr.Any,getParallelWorkLimit:Function,workPlans:pr.Any,lastDueDay:{default:1},allWorkItems:pr.Any,totalSimulationsToRun:{default:5e3},totalSyncSimulations:{default:50},simulationPercentComplete:{default:0},velocities:pr.Any,firstRunWorkPlans:{async(e){this.runOneSimulation(e,!0)}},startDate:pr.maybeConvert(Date),endDateWorkItem:null};get gridNumberOfDays(){return this.lastDueDay+1}get timeRanges(){const e=this.gridNumberOfDays,t=vw(this.startDate,e+1);return Ow(this.startDate,t,12)}connected(){this.listenTo("scheduledAllWork",this.insertBlockers.bind(this)),this.listenTo("firstRunWorkPlans",(({value:e})=>{this.afterFirstSimulation(e)})),this.afterFirstSimulation(this.firstRunWorkPlans),this.listenTo("uncertaintyWeight",(({value:e})=>{Fe.batch.start();for(let t in this.allWorkItems){const n=this.allWorkItems[t];n.uncertaintyWeight=e,n.updateStats()}this.endDateWorkItem.uncertaintyWeight=e,this.endDateWorkItem.updateStats(),Fe.batch.stop(),this.insertBlockers()}))}runOneSimulation(e,t){if(!this.configuration||!this.rawIssues.length)return e(void 0);Qw(this.rawIssues,{uncertaintyWeight:80,planIssuesInUncertaintyOrder:!0,probablisticallySelectIssueTiming:!0,onPlannedIssues:e,getVelocity:this.getVelocityForTeam.bind(this),onIgnoredIssues:function(e,t){},getEstimate:this.configuration.getEstimate,getTeamKey:this.configuration.getTeamKey,getParentKey:this.configuration.getParentKey,getConfidence:this.configuration.getConfidence,getParallelWorkLimit:this.getParallelWorkLimit})}afterFirstSimulation(e){if(!e)return;const t=this.endDateWorkItem=new sE({work:{issue:{Summary:"Due Date","Issue key":"Due Date",blocks:[],blocking:[],url:null}},uncertaintyWeight:this.uncertaintyWeight,dueDatesOnly:!0}),n=this.allWorkItems={},r=()=>{let e=0;Fe.batch.start();for(let t in n){const r=n[t];r.updateStats(),e=Math.max(r.dueDateTop95,e)}this.lastDueDay=e+2,t.updateStats(),Fe.batch.stop()},i=()=>{this.dispatch({type:"scheduledAllWork"})},a=(e,t=100)=>{for(let e=0;e0?(this.simulationPercentComplete=(this.totalSimulationsToRun-e)/this.totalSimulationsToRun*100,setTimeout((()=>a(e,t)),1)):(this.simulationPercentComplete=100,i())};function o(e){let r=0,i=null;for(let t in e){const a=e[t].workPlans.plans;for(const e of a)for(const t of e.work){n[t.issue["Issue key"]].addWork(t);const e=t.startDay+t.daysOfWork;e>r&&(r=e,i=t)}}t.addWork(i)}let s=0,u=null;const c=Object.values(e).map((({teamKey:e,velocity:t,workPlans:r})=>({teamKey:e,velocity:t,tracks:r.plans.map((e=>{const t={works:[],workMap:{}};for(const r of e.work){const e=new sE({work:r,uncertaintyWeight:this.uncertaintyWeight,dueDatesOnly:!1});t.workMap[r.issue["Issue key"]]=e,t.works.push(e),e.addWork(r),n[r.issue["Issue key"]]=e;const i=r.startDay+r.daysOfWork;i>s&&(s=i,u=r)}return t})),disableTracks:!1,disableVelocity:!1})));null!==u&&(t.addWork(u),c.unshift({teamKey:"Summary",velocity:null,tracks:[{works:[t],workMap:{SUMMARY:t}}],disableVelocity:!0,disableTracks:!0}),r(),this.workPlans=function(e){let t;const n=e.map(((e,n)=>{const r=t?t.gridRowStart+t.gridRowSpan:2,i=e.tracks.length+e.tracks.reduce(((e,t)=>e+t.works.length),0)+1;let a;const o=e.tracks.map(((e,t)=>a={...e,gridRowStart:a?a.gridRowStart+a.gridRowSpan+1:r+1,gridRowSpan:e.works.length,name:""+(t+1)}));return t={...e,gridRowStart:r,gridRowSpan:i,tracks:o}})),r=n[n.length-1];return n.gridRowSpan=r.gridRowStart+r.gridRowSpan,n}(c),setTimeout((()=>a(this.totalSimulationsToRun,this.totalSyncSimulations)),13))}canRemoveTrack(e,t){return t>1&&0===e}plus(e,t,n=0){return e+t+n}workIndexDependentStyles(e,t){if(e===t-1)return"pb-2"}insertBlockers(){const e=this.getElementsByTagName("svg")[0];e.innerHTML="";const t=e.getBoundingClientRect();e.setAttributeNS(null,"viewBox",`0 0 ${t.width} ${t.height}`);const n=function(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top}}(e),r={};[...this.getElementsByClassName("work-item")].forEach((e=>{this.allWorkItems[e.id]&&(r[e.id]={element:e,work:this.allWorkItems[e.id]})}));for(const{element:t,work:i}of Object.values(r)){const a=i.work.issue.blocks,o=fE(lE(t),n);for(const t of a){const a=cE({d:hE(o,fE(dE(r[t["Issue key"]].element),n))});a.classList.add("path-blocker"),a.id=i.work.issue["Issue key"]+"-"+t["Issue key"],e.appendChild(a)}}}showDependencies(e){vE(e.work.issue,"blocks","blocked",0),vE(e.work.issue,"blockedBy","blocking",0)}hideDependencies(e){gE(e.work.issue,"blocks","blocked",0),gE(e.work.issue,"blockedBy","blocking",0)}}function cE(e){const t=document.createElementNS("http://www.w3.org/2000/svg","path");for(let n in e)t.setAttributeNS(null,n,e[n]);return t}function lE(e){const t=e.getBoundingClientRect();return{x:t.right,y:t.top+t.height/2}}function dE(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top+t.height/2}}function fE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function hE(e,t,n=30){return`M ${e.x} ${e.y} \n c ${n} 0, ${t.x-e.x-n} ${t.y-e.y}, ${t.x-e.x} ${t.y-e.y}`}const pE={blockedBy:function(e,t){return document.getElementById(t+"-"+e)},blocks:function(e,t){return document.getElementById(e+"-"+t)}};function vE(e,t,n,r=0){const i=e["Issue key"];(e[t]||[]).forEach((e=>{const a=pE[t](i,e["Issue key"]);a&&a.classList.add(n+"-"+r,"work-"+n),vE(e,t,n,r+1)}))}function gE(e,t,n,r=0){const i=e["Issue key"];(e[t]||[]).forEach((e=>{const a=pE[t](i,e["Issue key"]);a&&a.classList.remove(n+"-"+r,"work-"+n),gE(e,t,n,r+1)}))}function yE(e){return e.ok?e.json():e.json().then((t=>{const n=new Error("HTTP status code: "+e.status);throw Object.assign(n,t),Object.assign(n,e),n}))}function mE(e){return e.ok?e.text():e.json().then((t=>{const n=new Error("HTTP status code: "+e.status);throw Object.assign(n,t),Object.assign(n,e),n}))}function bE(e,t){return fetch(e,t).then(yE)}function wE({JIRA_CLIENT_ID:e,JIRA_SCOPE:t,JIRA_CALLBACK_URL:n,JIRA_API_URL:r}=window.env){let i,a=bE;function o(e){async function t(n,r,i){const a=function(t,n,r){return function(e,t){const n=[];for(let r=0;r{const i=`parent in (${n.map((e=>e.key)).join(", ")})`;return e({...t,jql:i},r)}))}(n,r,i),o=e=>e.length?t(n,e,i).then((t=>e.concat(t))):e,s=a.map((e=>e.then(o)));return(await Promise.all(s)).flat()}return async function(n,r=function(){}){const a=await i,o={...n,fields:n.fields.map((e=>a.nameMap[e]||e))};r.data=r.data||{issuesRequested:0,issuesReceived:0,changeLogsRequested:0,changeLogsReceived:0};const s=await e(o,r),c=await t(o,s,r);return s.concat(c).map((e=>({...e,fields:u(e.fields,a)})))}}const s={saveInformationToLocalStorage:e=>{const t=Object.keys(e);for(let n of t)window.localStorage.setItem(n,e[n])},fetchFromLocalStorage:e=>window.localStorage.getItem(e),fetchAuthorizationCode:()=>{const r=`https://auth.atlassian.com/authorize?audience=api.atlassian.com&client_id=${e}&scope=${escape(t)}&redirect_uri=${n}&response_type=code&prompt=consent&state=${encodeURIComponent(encodeURIComponent(window.location.search))}`;window.location.href=r},refreshAccessToken:async e=>{try{const t=await a(`${window.env.JIRA_API_URL}/?code=${e}`),{accessToken:n,expiryTimestamp:r,refreshToken:i}=t.data;return s.saveInformationToLocalStorage({accessToken:n,refreshToken:i,expiryTimestamp:r}),n}catch(e){console.error(e.message),window.localStorage.clear(),s.fetchAuthorizationCode()}},fetchAccessTokenWithAuthCode:async e=>{try{const{accessToken:t,expiryTimestamp:n,refreshToken:r,scopeId:i}=await a(`./access-token?code=${e}`);s.saveInformationToLocalStorage({accessToken:t,refreshToken:r,expiryTimestamp:n,scopeId:i});const o=new URL(window.location).searchParams.get("state");decodeURIComponent(o);location.href="/"+(o||"")}catch(e){console.error(e)}},fetchAccessibleResources:e=>{const t=e||s.fetchFromLocalStorage("accessToken");return a("https://api.atlassian.com/oauth/token/accessible-resources",{headers:{Authorization:`Bearer ${t}`}})},fetchJiraSprint:async e=>{const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken"),i=`${r}/${t}/rest/agile/1.0/sprint/${e}`,o={headers:{Authorization:`Bearer ${n}`}};return await a(i,o)},fetchJiraIssue:async e=>{const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken"),i=`${r}/${t}/rest/api/3/issue/${e}`,o={headers:{Authorization:`Bearer ${n}`}};return await a(i,o)},editJiraIssueWithNamedFields:async(e,t)=>{const n=s.fetchFromLocalStorage("scopeId"),a=s.fetchFromLocalStorage("accessToken"),o=function(e,t){const n={fields:{},update:{}};for(let r in e)n.update[t.nameMap[r]||r]=[{set:e[r]}];return n}(t,await i);return fetch(`${r}/${n}/rest/api/3/issue/${e}?`,{method:"PUT",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)}).then(mE)},fetchJiraIssuesWithJQL:function(e){const t=s.fetchFromLocalStorage("scopeId"),n=s.fetchFromLocalStorage("accessToken");return a(`${r}/${t}/rest/api/3/search?`+new URLSearchParams(e),{headers:{Authorization:`Bearer ${n}`}})},fetchAllJiraIssuesWithJQL:async function(e){const{limit:t,...n}=e,r=s.fetchJiraIssuesWithJQL({maxResults:100,...n}),{issues:i,maxResults:a,total:o,startAt:u}=await r,c=[r],l=Math.min(o,t||1/0);for(let e=u+a;ee.map((e=>e.issues)).flat()))},fetchAllJiraIssuesWithJQLUsingNamedFields:async function(e){const t=await i,n={...e,fields:e.fields.map((e=>t.nameMap[e]||e))};return(await s.fetchAllJiraIssuesWithJQL(n)).map((e=>({...e,fields:u(e.fields,t)})))},fetchJiraChangelog(e,t){const n=s.fetchFromLocalStorage("scopeId"),i=s.fetchFromLocalStorage("accessToken");return a(`${r}/${n}/rest/api/3/issue/${e}/changelog?`+new URLSearchParams(t),{headers:{Authorization:`Bearer ${i}`}})},isChangelogComplete:e=>e.histories.length===e.total,fetchRemainingChangelogsForIssues:(e,t=function(){})=>Promise.all(e.map((e=>s.isChangelogComplete(e.changelog)?{...e,changelog:e.changelog.histories}:s.fetchRemainingChangelogsForIssue(e.key,e.changelog).then((t=>({...e,changelog:e.changelog.histories})))))),fetchRemainingChangelogsForIssue(e,t){const{histories:n,maxResults:r,total:i,startAt:a}=t,o=[];o.push({values:t.histories});for(let t=0;t({...e,values:e.values.reverse()}))));return Promise.all(o).then((e=>e.map((e=>e.values)).flat())).then((function(e){return e}))},fetchAllJiraIssuesWithJQLAndFetchAllChangelog:function(e,t=function(){}){const{limit:n,...r}=e;function i(e){return Object.assign(t.data,{issuesReceived:t.data.issuesReceived+e.issues.length}),t(t.data),s.fetchRemainingChangelogsForIssues(e.issues,t)}t.data=t.data||{issuesRequested:0,issuesReceived:0,changeLogsRequested:0,changeLogsReceived:0};const a=s.fetchJiraIssuesWithJQL({maxResults:100,expand:["changelog"],...r});return a.then((({issues:e,maxResults:n,total:o,startAt:u})=>{Object.assign(t.data,{issuesRequested:t.data.issuesRequested+o,changeLogsRequested:0,changeLogsReceived:0}),t(t.data);const c=[a.then(i)];for(let e=u+n;ee.flat()))}))},fetchAllJiraIssuesWithJQLAndFetchAllChangelogUsingNamedFields:async function(e,t){const n=await i,r={...e,fields:e.fields.map((e=>n.nameMap[e]||e))};return(await s.fetchAllJiraIssuesWithJQLAndFetchAllChangelog(r,t)).map((e=>({...e,fields:u(e.fields,n)})))},fetchJiraFields(){const e=s.fetchFromLocalStorage("scopeId"),t=s.fetchFromLocalStorage("accessToken");return a(`${r}/${e}/rest/api/3/field`,{headers:{Authorization:`Bearer ${t}`}})},getAccessToken:async function(){if(s.hasValidAccessToken())return s.fetchFromLocalStorage("accessToken");if(s.fetchFromLocalStorage("refreshToken"))return s.refreshAccessToken();s.fetchAuthorizationCode()},hasAccessToken:function(){return!!s.fetchFromLocalStorage("accessToken")},hasValidAccessToken:function(){const e=s.fetchFromLocalStorage("accessToken");let t=Number(s.fetchFromLocalStorage("expiryTimestamp"));isNaN(t)&&(t=0);return!(Math.floor((new Date).getTime()/1e3)>t||!e)},getServerInfo(){const e=s.fetchFromLocalStorage("scopeId"),t=s.fetchFromLocalStorage("accessToken");return a(`${r}/${e}/rest/api/3/serverInfo`,{headers:{Authorization:`Bearer ${t}`}})}};function u(e,t){const n={};for(let r in e)n[t.idMap[r]||r]=e[r];return n}return s.fetchAllJiraIssuesAndDeepChildrenWithJQLUsingNamedFields=o(s.fetchAllJiraIssuesWithJQL.bind(s)),s.fetchAllJiraIssuesAndDeepChildrenWithJQLAndFetchAllChangelogUsingNamedFields=o(s.fetchAllJiraIssuesWithJQLAndFetchAllChangelog.bind(s)),s.hasValidAccessToken()&&(i=s.fetchJiraFields().then((e=>{const t={},n={};return e.forEach((e=>{n[e.id]=e.name,t[e.name]=e.id})),console.log(t),{list:e,nameMap:t,idMap:n}})),s.fieldsRequest=i),window.jiraHelpers=s}customElements.define("monte-carlo",uE);const EE=new Promise(((e,t)=>{setTimeout((function(){import("./update-epics-3aJHIHUH.js").then(e,t)}),500)}));class kE extends dh{static view='\n \n {{# if(this.showSavingModal)}}\n \n {{/ }}\n \n {{# if(this.loginComponent.isLoggedIn) }}\n\n \n \n \n Configure JQL: {{ this.issueJQL}}\n \n \n\n \n {{ else }}\n
\n The following is a sample plan. Learn more about it in the \n "Agile Program Management with Jira" \n training. Click "Connect to Jira" to load your own data.\n
\"); //-> \"<div> </div>\"\n\t * ```\n\t */\n\tesc: function (content) {\n\t\treturn convertBadValues(content)\n\t\t\t.replace(/&/g, '&')\n\t\t\t.replace(//g, '>')\n\t\t\t.replace(strQuote, '"')\n\t\t\t.replace(strSingleQuote, ''');\n\t},\n\t/**\n\t * @function can-string.capitalize capitalize\n\t * @signature `string.capitalize(s)`\n\t * @param {String} s the string to capitalize\n\t * @return {String} the supplied string with the first character uppercased if it is a letter\n\t *\n\t * ```js\n\t * var string = require(\"can-string\");\n\t *\n\t * console.log(string.capitalize(\"foo\")); // -> \"Foo\"\n\t * console.log(string.capitalize(\"123\")); // -> \"123\"\n\t * ```\n\t */\n\tcapitalize: function (s) {\n\t\t// Used to make newId.\n\t\treturn s.charAt(0)\n\t\t\t.toUpperCase() + s.slice(1);\n\t},\n\t/**\n\t * @function can-string.camelize camelize\n\t * @signature `string.camelize(s)`\n\t * @param {String} str the string to camelCase\n\t * @return {String} the supplied string with hyphens removed and following letters capitalized.\n\t *\n\t * ```js\n\t * var string = require(\"can-string\");\n\t *\n\t * console.log(string.camelize(\"foo-bar\")); // -> \"fooBar\"\n\t * console.log(string.camelize(\"-webkit-flex-flow\")); // -> \"WebkitFlexFlow\"\n\t * ```\n\t */\n\tcamelize: function (str) {\n\t\treturn convertBadValues(str)\n\t\t\t.replace(strHyphenMatch, function (match, chr) {\n\t\t\t\treturn chr ? chr.toUpperCase() : '';\n\t\t\t});\n\t},\n\t/**\n\t * @function can-string.hyphenate hyphenate\n\t * @signature `string.hyphenate(s)`\n\t * @param {String} str a string in camelCase\n\t * @return {String} the supplied string with camelCase converted to hyphen-lowercase digraphs\n\t *\n\t * ```js\n\t * var string = require(\"can-string\");\n\t *\n\t * console.log(string.hyphenate(\"fooBar\")); // -> \"foo-bar\"\n\t * console.log(string.hyphenate(\"WebkitFlexFlow\")); // -> \"Webkit-flex-flow\"\n\t * ```\n\t */\n\thyphenate: function (str) {\n\t\treturn convertBadValues(str)\n\t\t\t.replace(strCamelMatch, function (str) {\n\t\t\t\treturn str.charAt(0) + '-' + str.charAt(1)\n\t\t\t\t\t.toLowerCase();\n\t\t\t});\n\t},\n\t/**\n\t * @function can-string.pascalize pascalize\n\t * @signature `string.pascalize(s)`\n\t * @param {String} str the string in hyphen case | camelCase\n\t * @return {String} the supplied string with hyphens | camelCase converted to PascalCase\n\t *\n\t * ```js\n\t * var string = require(\"can-string\");\n\t *\n\t * console.log(string.pascalize(\"fooBar\")); // -> \"FooBar\"\n\t * console.log(string.pascalize(\"baz-bar\")); // -> \"BazBar\"\n\t * ```\n\t */\n\tpascalize: function (str) {\n\t\treturn string.capitalize(string.camelize(str));\n\t},\n\t/**\n\t * @function can-string.underscore underscore\n\t * @signature `string.underscore(s)`\n\t * @param {String} str a string in camelCase\n\t * @return {String} the supplied string with camelCase converted to underscore-lowercase digraphs\n\t *\n\t * ```js\n\t * var string = require(\"can-string\");\n\t *\n\t * console.log(string.underscore(\"fooBar\")); // -> \"foo_bar\"\n\t * console.log(string.underscore(\"HTMLElement\")); // -> \"html_element\"\n\t * ```\n\t */\n\tunderscore: function (s) {\n\t\treturn s.replace(strColons, '/')\n\t\t\t.replace(strWords, '$1_$2')\n\t\t\t.replace(strLowUp, '$1_$2')\n\t\t\t.replace(strDash, '_')\n\t\t\t.toLowerCase();\n\t},\n\t/**\n\t * @property {RegExp} can-string.strUndHash strUndHash\n\t *\n\t * A regex which matches an underscore or hyphen character\n\t */\n\tundHash: strUndHash\n};\nvar canString_1_1_0_canString = string;\n\nvar inSetupSymbol = canSymbol_1_7_0_canSymbol.for(\"can.initializing\");\n\n//!steal-remove-start\nif(process.env.NODE_ENV !== 'production') {\n\tvar CanString = canString_1_1_0_canString;\n\tvar reservedWords = {\n\t\t\"abstract\": true,\n\t\t\"boolean\": true,\n\t\t\"break\": true,\n\t\t\"byte\": true,\n\t\t\"case\": true,\n\t\t\"catch\": true,\n\t\t\"char\": true,\n\t\t\"class\": true,\n\t\t\"const\": true,\n\t\t\"continue\": true,\n\t\t\"debugger\": true,\n\t\t\"default\": true,\n\t\t\"delete\": true,\n\t\t\"do\": true,\n\t\t\"double\": true,\n\t\t\"else\": true,\n\t\t\"enum\": true,\n\t\t\"export\": true,\n\t\t\"extends\": true,\n\t\t\"false\": true,\n\t\t\"final\": true,\n\t\t\"finally\": true,\n\t\t\"float\": true,\n\t\t\"for\": true,\n\t\t\"function\": true,\n\t\t\"goto\": true,\n\t\t\"if\": true,\n\t\t\"implements\": true,\n\t\t\"import\": true,\n\t\t\"in\": true,\n\t\t\"instanceof\": true,\n\t\t\"int\": true,\n\t\t\"interface\": true,\n\t\t\"let\": true,\n\t\t\"long\": true,\n\t\t\"native\": true,\n\t\t\"new\": true,\n\t\t\"null\": true,\n\t\t\"package\": true,\n\t\t\"private\": true,\n\t\t\"protected\": true,\n\t\t\"public\": true,\n\t\t\"return\": true,\n\t\t\"short\": true,\n\t\t\"static\": true,\n\t\t\"super\": true,\n\t\t\"switch\": true,\n\t\t\"synchronized\": true,\n\t\t\"this\": true,\n\t\t\"throw\": true,\n\t\t\"throws\": true,\n\t\t\"transient\": true,\n\t\t\"true\": true,\n\t\t\"try\": true,\n\t\t\"typeof\": true,\n\t\t\"var\": true,\n\t\t\"void\": true,\n\t\t\"volatile\": true,\n\t\t\"while\": true,\n\t\t\"with\": true\n\t};\n\tvar constructorNameRegex = /[^A-Z0-9_]/gi;\n}\n//!steal-remove-end\n\n// ## construct.js\n// `Construct`\n// _This is a modified version of\n// [John Resig's class](http://ejohn.org/blog/simple-javascript-inheritance/).\n// It provides class level inheritance and callbacks._\n// A private flag used to initialize a new class instance without\n// initializing it's bindings.\nvar initializing = 0;\n\n//!steal-remove-start\nif(process.env.NODE_ENV !== 'production') {\n\tvar namedCtor = (function(cache){\n\t\treturn function(name, fn) {\n\t\t\treturn ((name in cache) ? cache[name] : cache[name] = new Function(\n\t\t\t\t\"__\", \"function \"+name+\"(){return __.apply(this,arguments)};return \"+name\n\t\t\t))( fn );\n\t\t};\n\t}({}));\n}\n//!steal-remove-end\n\n/**\n * @add can-construct\n */\nvar Construct = function () {\n\tif (arguments.length) {\n\t\treturn Construct.extend.apply(Construct, arguments);\n\t}\n};\n\nvar canGetDescriptor;\ntry {\n\tcanGetDescriptor = true;\n} catch(e) {\n\tcanGetDescriptor = false;\n}\n\nvar getDescriptor = function(newProps, name) {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(newProps, name);\n\t\tif(descriptor && (descriptor.get || descriptor.set)) {\n\t\t\treturn descriptor;\n\t\t}\n\t\treturn null;\n\t},\n\tinheritGetterSetter = function(newProps, oldProps, addTo) {\n\t\taddTo = addTo || newProps;\n\t\tvar descriptor;\n\n\t\tfor (var name in newProps) {\n\t\t\tif( (descriptor = getDescriptor(newProps, name)) ) {\n\t\t\t\tthis._defineProperty(addTo, oldProps, name, descriptor);\n\t\t\t} else {\n\t\t\t\tConstruct._overwrite(addTo, oldProps, name, newProps[name]);\n\t\t\t}\n\t\t}\n\t},\n\tsimpleInherit = function (newProps, oldProps, addTo) {\n\t\taddTo = addTo || newProps;\n\n\t\tfor (var name in newProps) {\n\t\t\tConstruct._overwrite(addTo, oldProps, name, newProps[name]);\n\t\t}\n\t},\n\tdefineNonEnumerable = function(obj, prop, value) {\n\t\tObject.defineProperty(obj, prop, {\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value\n\t\t});\n\t};\n/**\n * @static\n */\ncanReflect_1_19_2_canReflect.assignMap(Construct, {\n\t/**\n\t * @property {Boolean} can-construct.constructorExtends constructorExtends\n\t * @parent can-construct.static\n\t *\n\t * @description\n\t * Toggles the behavior of a constructor function called\n\t * without the `new` keyword to extend the constructor function or\n\t * create a new instance.\n\t *\n\t * ```js\n\t * var animal = Animal();\n\t * // vs\n\t * var animal = new Animal();\n\t * ```\n\t *\n\t * @body\n\t *\n\t * If `constructorExtends` is:\n\t *\n\t * - `true` - the constructor extends\n\t * - `false` - a new instance of the constructor is created\n\t *\n\t * This property defaults to false.\n\t *\n\t * Example of constructExtends as `true`:\n\t *\n\t * ```js\n\t * var Animal = Construct.extend({\n\t * constructorExtends: true // the constructor extends\n\t * },{\n\t * sayHi: function() {\n\t * console.log(\"hai!\");\n\t * }\n\t * });\n\t *\n\t * var Pony = Animal({\n\t * gallop: function () {\n\t * console.log(\"Galloping!!\");\n\t * }\n\t * }); // Pony is now a constructor function extended from Animal\n\t *\n\t * var frank = new Animal(); // frank is a new instance of Animal\n\t *\n\t * var gertrude = new Pony(); // gertrude is a new instance of Pony\n\t * gertrude.sayHi(); // \"hai!\" - sayHi is \"inherited\" from Animal\n\t * gertrude.gallop(); // \"Galloping!!\" - gallop is unique to instances of Pony\n\t *```\n\t *\n\t * The default behavior is shown in the example below:\n\t *\n\t * ```js\n\t * var Animal = Construct.extend({\n\t * constructorExtends: false // the constructor does NOT extend\n\t * },{\n\t * sayHi: function() {\n\t * console.log(\"hai!\");\n\t * }\n\t * });\n\t *\n\t * var pony = Animal(); // pony is a new instance of Animal\n\t * var frank = new Animal(); // frank is a new instance of Animal\n\t *\n\t * pony.sayHi() // \"hai!\"\n\t * frank.sayHi() // \"hai!\"\n\t *```\n\t * By default to extend a constructor, you must use [can-construct.extend extend].\n\t */\n\tconstructorExtends: true,\n\n\t// This is a hook for adding legacy behaviors\n\t_created: function(){},\n\t/**\n\t * @function can-construct.newInstance newInstance\n\t * @parent can-construct.static\n\t *\n\t * @description Returns an instance of `Construct`. This method\n\t * can be overridden to return a cached instance.\n\t *\n\t * @signature `Construct.newInstance([...args])`\n\t *\n\t * @param {*} [args] arguments that get passed to [can-construct::setup] and [can-construct::init]. Note\n\t * that if [can-construct::setup] returns an array, those arguments will be passed to [can-construct::init]\n\t * instead.\n\t * @return {class} instance of the class\n\t *\n\t * @body\n\t * Creates a new instance of the constructor function. This method is useful for creating new instances\n\t * with arbitrary parameters. Typically, however, you will simply want to call the constructor with the\n\t * __new__ operator.\n\t *\n\t * ## Example\n\t *\n\t * The following creates a `Person` Construct and overrides `newInstance` to cache all\n\t * instances of Person to prevent duplication. If the properties of a new Person match an existing one it\n\t * will return a reference to the previously created object, otherwise it returns a new object entirely.\n\t *\n\t * ```js\n\t * // define and create the Person constructor\n\t * var Person = Construct.extend({\n\t * init : function(first, middle, last) {\n\t * this.first = first;\n\t * this.middle = middle;\n\t * this.last = last;\n\t * }\n\t * });\n\t *\n\t * // store a reference to the original newInstance function\n\t * var _newInstance = Person.newInstance;\n\t *\n\t * // override Person's newInstance function\n\t * Person.newInstance = function() {\n\t * // if cache does not exist make it an new object\n\t * this.__cache = this.__cache || {};\n\t * // id is a stingified version of the passed arguments\n\t * var id = JSON.stringify(arguments);\n\t *\n\t * // look in the cache to see if the object already exists\n\t * var cachedInst = this.__cache[id];\n\t * if(cachedInst) {\n\t * return cachedInst;\n\t * }\n\t *\n\t * //otherwise call the original newInstance function and return a new instance of Person.\n\t * var newInst = _newInstance.apply(this, arguments);\n\t * this.__cache[id] = newInst;\n\t * return newInst;\n\t * };\n\t *\n\t * // create two instances with the same arguments\n\t * var justin = new Person('Justin', 'Barry', 'Meyer'),\n\t *\t\tbrian = new Person('Justin', 'Barry', 'Meyer');\n\t *\n\t * console.log(justin === brian); // true - both are references to the same instance\n\t * ```\n\t *\n\t */\n\tnewInstance: function () {\n\t\t// Get a raw instance object (`init` is not called).\n\t\tvar inst = this.instance(),\n\t\t\targs;\n\t\t// Call `setup` if there is a `setup`\n\t\tif (inst.setup) {\n\t\t\tObject.defineProperty(inst,\"__inSetup\",{\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: true,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t\tObject.defineProperty(inst, inSetupSymbol, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: true,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t\targs = inst.setup.apply(inst, arguments);\n\t\t\tif (args instanceof Construct.ReturnValue){\n\t\t\t\treturn args.value;\n\t\t\t}\n\t\t\tinst.__inSetup = false;\n\t\t\tinst[inSetupSymbol] = false;\n\t\t}\n\t\t// Call `init` if there is an `init`\n\t\t// If `setup` returned `args`, use those as the arguments\n\t\tif (inst.init) {\n\t\t\tinst.init.apply(inst, args || arguments);\n\t\t}\n\t\treturn inst;\n\t},\n\t// Overwrites an object with methods. Used in the `super` plugin.\n\t// `newProps` - New properties to add.\n\t// `oldProps` - Where the old properties might be (used with `super`).\n\t// `addTo` - What we are adding to.\n\t_inherit: canGetDescriptor ? inheritGetterSetter : simpleInherit,\n\n\t// Adds a `defineProperty` with the given name and descriptor\n\t// Will only ever be called if ES5 is supported\n\t_defineProperty: function(what, oldProps, propName, descriptor) {\n\t\tObject.defineProperty(what, propName, descriptor);\n\t},\n\n\t// used for overwriting a single property.\n\t// this should be used for patching other objects\n\t// the super plugin overwrites this\n\t_overwrite: function (what, oldProps, propName, val) {\n\t\tObject.defineProperty(what, propName, {value: val, configurable: true, enumerable: true, writable: true});\n\t},\n\t// Set `defaults` as the merger of the parent `defaults` and this\n\t// object's `defaults`. If you overwrite this method, make sure to\n\t// include option merging logic.\n\t/**\n\t * @function can-construct.setup setup\n\t * @parent can-construct.static\n\t *\n\t * @description Perform initialization logic for a constructor function.\n\t *\n\t * @signature `Construct.setup(base, fullName, staticProps, protoProps)`\n\t *\n\t * A static `setup` method provides inheritable setup functionality\n\t * for a Constructor function. The following example\n\t * creates a Group constructor function. Any constructor\n\t * functions that inherit from Group will be added to\n\t * `Group.childGroups`.\n\t *\n\t * ```js\n\t * Group = Construct.extend({\n\t * setup: function(Construct, fullName, staticProps, protoProps){\n\t * this.childGroups = [];\n\t * if(Construct !== Construct){\n\t * this.childGroups.push(Construct)\n\t * }\n\t * Construct.setup.apply(this, arguments)\n\t * }\n\t * },{})\n\t * var Flock = Group.extend(...)\n\t * Group.childGroups[0] //-> Flock\n\t * ```\n\t * @param {constructor} base The base constructor that is being inherited from.\n\t * @param {String} fullName The name of the new constructor.\n\t * @param {Object} staticProps The static properties of the new constructor.\n\t * @param {Object} protoProps The prototype properties of the new constructor.\n\t *\n\t * @body\n\t * The static `setup` method is called immediately after a constructor\n\t * function is created and\n\t * set to inherit from its base constructor. It is useful for setting up\n\t * additional inheritance work.\n\t * Do not confuse this with the prototype `[can-construct::setup]` method.\n\t *\n\t * ## Example\n\t *\n\t * This `Parent` class adds a reference to its base class to itself, and\n\t * so do all the classes that inherit from it.\n\t *\n\t * ```js\n\t * Parent = Construct.extend({\n\t * setup : function(base, fullName, staticProps, protoProps){\n\t * this.base = base;\n\t *\n\t * // call base functionality\n\t * Construct.setup.apply(this, arguments)\n\t * }\n\t * },{});\n\t *\n\t * Parent.base; // Construct\n\t *\n\t * Child = Parent({});\n\t *\n\t * Child.base; // Parent\n\t * ```\n\t */\n\tsetup: function (base) {\n\t\tvar defaults = base.defaults ? canReflect_1_19_2_canReflect.serialize(base.defaults) : {};\n\t\tthis.defaults = canReflect_1_19_2_canReflect.assignDeepMap(defaults,this.defaults);\n\t},\n\t// Create's a new `class` instance without initializing by setting the\n\t// `initializing` flag.\n\tinstance: function () {\n\t\t// Prevents running `init`.\n\t\tinitializing = 1;\n\t\tvar inst = new this();\n\t\t// Allow running `init`.\n\t\tinitializing = 0;\n\t\treturn inst;\n\t},\n\t// Extends classes.\n\t/**\n\t * @function can-construct.extend extend\n\t * @parent can-construct.static\n\t *\n\t * @signature `Construct.extend([name,] [staticProperties,] instanceProperties)`\n\t *\n\t * Extends `Construct`, or constructor functions derived from `Construct`,\n\t * to create a new constructor function. Example:\n\t *\n\t * ```js\n\t * var Animal = Construct.extend({\n\t * sayHi: function(){\n\t * console.log(\"hi\")\n\t * }\n\t * });\n\t *\n\t * var animal = new Animal()\n\t * animal.sayHi();\n\t * ```\n\t *\n\t * @param {String} [name] Adds a name to the constructor function so\n\t * it is nicely labeled in the developer tools. The following:\n\t *\n\t * Construct.extend(\"ConstructorName\",{})\n\t *\n\t * returns a constructur function that will show up as `ConstructorName`\n\t * in the developer tools.\n\t * It also sets \"ConstructorName\" as [can-construct.shortName shortName].\n\t *\n\t * @param {Object} [staticProperties] Properties that are added the constructor\n\t * function directly. For example:\n\t *\n\t * ```js\n\t * var Animal = Construct.extend({\n\t * findAll: function(){\n\t * return can.ajax({url: \"/animals\"})\n\t * }\n\t * },{}); // need to pass an empty instanceProperties object\n\t *\n\t * Animal.findAll().then(function(json){ ... })\n\t * ```\n\t *\n\t * The [can-construct.setup static setup] method can be used to\n\t * specify inheritable behavior when a Constructor function is created.\n\t *\n\t * @param {Object} instanceProperties Properties that belong to\n\t * instances made with the constructor. These properties are added to the\n\t * constructor's `prototype` object. Example:\n\t *\n\t * var Animal = Construct.extend({\n\t *\t\t findAll: function() {\n\t *\t\t\treturn can.ajax({url: \"/animals\"});\n\t *\t\t }\n\t * },{\n\t * init: function(name) {\n\t * this.name = name;\n\t * },\n\t * sayHi: function() {\n\t * console.log(this.name,\" says hai!\");\n\t * }\n\t * })\n\t * var pony = new Animal(\"Gertrude\");\n\t * pony.sayHi(); // \"Gertrude says hai!\"\n\t *\n\t * The [can-construct::init init] and [can-construct::setup setup] properties\n\t * are used for initialization.\n\t *\n\t * @return {function} The constructor function.\n\t *\n\t * ```js\n\t *\tvar Animal = Construct.extend(...);\n\t *\tvar pony = new Animal(); // Animal is a constructor function\n\t * ```\n\t * @body\n\t * ## Inheritance\n\t * Creating \"subclasses\" with `Construct` is simple. All you need to do is call the base constructor\n\t * with the new function's static and instance properties. For example, we want our `Snake` to\n\t * be an `Animal`, but there are some differences:\n\t *\n\t *\n\t * var Snake = Animal.extend({\n\t * legs: 0\n\t * }, {\n\t * init: function() {\n\t * Animal.prototype.init.call(this, 'ssssss');\n\t * },\n\t * slither: function() {\n\t * console.log('slithering...');\n\t * }\n\t * });\n\t *\n\t * var baslisk = new Snake();\n\t * baslisk.speak(); // \"ssssss\"\n\t * baslisk.slither(); // \"slithering...\"\n\t * baslisk instanceof Snake; // true\n\t * baslisk instanceof Animal; // true\n\t *\n\t *\n\t * ## Static properties and inheritance\n\t *\n\t * If you pass all three arguments to Construct, the second one will be attached directy to the\n\t * constructor, allowing you to imitate static properties and functions. You can access these\n\t * properties through the `[can-construct::constructor this.constructor]` property.\n\t *\n\t * Static properties can get overridden through inheritance just like instance properties. In the example below,\n\t * we override both the legs static property as well as the the init function for each instance:\n\t *\n\t * ```js\n\t * var Animal = Construct.extend({\n\t * legs: 4\n\t * }, {\n\t * init: function(sound) {\n\t * this.sound = sound;\n\t * },\n\t * speak: function() {\n\t * console.log(this.sound);\n\t * }\n\t * });\n\t *\n\t * var Snake = Animal.extend({\n\t * legs: 0\n\t * }, {\n\t * init: function() {\n\t * this.sound = 'ssssss';\n\t * },\n\t * slither: function() {\n\t * console.log('slithering...');\n\t * }\n\t * });\n\t *\n\t * Animal.legs; // 4\n\t * Snake.legs; // 0\n\t * var dog = new Animal('woof');\n\t * var blackMamba = new Snake();\n\t * dog.speak(); // 'woof'\n\t * blackMamba.speak(); // 'ssssss'\n\t * ```\n\t *\n\t * ## Alternative value for a new instance\n\t *\n\t * Sometimes you may want to return some custom value instead of a new object when creating an instance of your class.\n\t * For example, you want your class to act as a singleton, or check whether an item with the given id was already\n\t * created and return an existing one from your cache store (e.g. using [can-connect/constructor/store/store]).\n\t *\n\t * To achieve this you can return [can-construct.ReturnValue] from `setup` method of your class.\n\t *\n\t * Lets say you have `myStore` to cache all newly created instances. And if an item already exists you want to merge\n\t * the new data into the existing instance and return the updated instance.\n\t *\n\t * ```\n\t * var myStore = {};\n\t *\n\t * var Item = Construct.extend({\n\t * setup: function(params){\n\t * if (myStore[params.id]){\n\t * var item = myStore[params.id];\n\t *\n\t * // Merge new data to the existing instance:\n\t * Object.assign(item, params);\n\t *\n\t * // Return the updated item:\n\t * return new Construct.ReturnValue( item );\n\t * } else {\n\t * // Save to cache store:\n\t * myStore[this.id] = this;\n\t *\n\t * return [params];\n\t * }\n\t * },\n\t * init: function(params){\n\t * Object.assign(this, params);\n\t * }\n\t * });\n\t *\n\t * var item_1 = new Item( {id: 1, name: \"One\"} );\n\t * var item_1a = new Item( {id: 1, name: \"OnePlus\"} )\n\t * ```\n\t */\n\textend: function (name, staticProperties, instanceProperties) {\n\t\tvar shortName = name,\n\t\t\tklass = staticProperties,\n\t\t\tproto = instanceProperties;\n\n\t\t// Figure out what was passed and normalize it.\n\t\tif (typeof shortName !== 'string') {\n\t\t\tproto = klass;\n\t\t\tklass = shortName;\n\t\t\tname = shortName = null;\n\t\t}\n\t\tif (!proto) {\n\t\t\tproto = klass;\n\t\t\tklass = null;\n\t\t}\n\t\tproto = proto || {};\n\t\tvar _super_class = this,\n\t\t\t_super = this.prototype,\n\t\t\tConstructor, prototype;\n\t\t// Instantiate a base class (but only create the instance,\n\t\t// don't run the init constructor).\n\t\tprototype = this.instance();\n\t\t// Copy the properties over onto the new prototype.\n\t\tConstruct._inherit(proto, _super, prototype);\n\n\t\tif(shortName) {\n\n\t\t} else if(klass && klass.shortName) {\n\t\t\tshortName = klass.shortName;\n\t\t} else if(this.shortName) {\n\t\t\tshortName = this.shortName;\n\t\t}\n\t\t// We want constructor.name to be the same as shortName, within\n\t\t// the bounds of what the JS VM will allow (meaning no non-word characters).\n\t\t// new Function() is significantly faster than eval() here.\n\n\t\t// Strip semicolons\n\t\t//!steal-remove-start\n\t\t// wrapping this var will cause \"used out of scope.\" when linting\n\t\tvar constructorName = shortName ? shortName.replace(constructorNameRegex, '_') : 'Constructor';\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tif(reservedWords[constructorName]) {\n\t\t\t\tconstructorName = CanString.capitalize(constructorName);\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\t// The dummy class constructor.\n\t\tfunction init() {\n\t\t\t/* jshint validthis: true */\n\t\t\t// All construction is actually done in the init method.\n\t\t\tif (!initializing) {\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tif(!this || (this.constructor !== Constructor) &&\n\t\t\t\t\t// We are being called without `new` or we are extending.\n\t\t\t\t\targuments.length && Constructor.constructorExtends) {\n\t\t\t\t\t\tdev.warn('can/construct/construct.js: extending a Construct without calling extend');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\n\t\t\t\treturn (!this || this.constructor !== Constructor) &&\n\t\t\t\t// We are being called without `new` or we are extending.\n\t\t\t\targuments.length && Constructor.constructorExtends ? Constructor.extend.apply(Constructor, arguments) :\n\t\t\t\t// We are being called with `new`.\n\t\t\t\tConstructor.newInstance.apply(Constructor, arguments);\n\t\t\t}\n\t\t}\n\t\tConstructor = typeof namedCtor === \"function\" ?\n\t\t\tnamedCtor( constructorName, init ) :\n\t\t\tfunction() { return init.apply(this, arguments); };\n\n\t\t// Copy old stuff onto class (can probably be merged w/ inherit)\n\t\tfor (var propName in _super_class) {\n\t\t\tif (_super_class.hasOwnProperty(propName)) {\n\t\t\t\tConstructor[propName] = _super_class[propName];\n\t\t\t}\n\t\t}\n\t\t// Copy new static properties on class.\n\t\tConstruct._inherit(klass, _super_class, Constructor);\n\n\t\t// Set things that shouldn't be overwritten.\n\t\tcanReflect_1_19_2_canReflect.assignMap(Constructor, {\n\t\t\tconstructor: Constructor,\n\t\t\tprototype: prototype\n\t\t\t/**\n\t\t\t * @property {String} can-construct.shortName shortName\n\t\t\t * @parent can-construct.static\n\t\t\t *\n\t\t\t * If you pass a name when creating a Construct, the `shortName` property will be set to the\n\t\t\t * name.\n\t\t\t *\n\t\t\t * ```js\n\t\t\t * var MyConstructor = Construct.extend(\"MyConstructor\",{},{});\n\t\t\t * MyConstructor.shortName // \"MyConstructor\"\n\t\t\t * ```\n\t\t\t */\n\t\t});\n\n\t\tif (shortName !== undefined) {\n\t\t\tif (Object.getOwnPropertyDescriptor) {\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(Constructor, 'name');\n\t\t\t\tif (!desc || desc.configurable) {\n\t\t\t\t\tObject.defineProperty(\n\t\t\t\t\t\tConstructor,\n\t\t\t\t\t\t'name',\n\t\t\t\t\t\t{ writable: true, value: shortName, configurable: true }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tConstructor.shortName = shortName;\n\t\t}\n\t\t// Make sure our prototype looks nice.\n\t\tdefineNonEnumerable(Constructor.prototype, \"constructor\", Constructor);\n\n\t\t// Global callback for legacy behaviors\n\t\tConstruct._created(name, Constructor);\n\n\t\t// Call the class `setup` and `init`\n\t\tvar t = [_super_class].concat(Array.prototype.slice.call(arguments)),\n\t\t\targs = Constructor.setup.apply(Constructor, t);\n\t\tif (Constructor.init) {\n\t\t\tConstructor.init.apply(Constructor, args || t);\n\t\t}\n\t\t/**\n\t\t * @prototype\n\t\t */\n\t\treturn Constructor; //\n\t\t/**\n\t\t * @property {Object} can-construct.prototype.constructor constructor\n\t\t * @parent can-construct.prototype\n\t\t *\n\t\t * A reference to the constructor function that created the instance. This allows you to access\n\t\t * the constructor's static properties from an instance.\n\t\t *\n\t\t * @body\n\t\t * ## Example\n\t\t *\n\t\t * This Construct has a static counter that counts how many instances have been created:\n\t\t *\n\t\t * ```js\n\t\t * var Counter = Construct.extend({\n\t\t * count: 0\n\t\t * }, {\n\t\t * init: function() {\n\t\t * this.constructor.count++;\n\t\t * }\n\t\t * });\n\t\t *\n\t\t * var childCounter = new Counter();\n\t\t * console.log(childCounter.constructor.count); // 1\n\t\t * console.log(Counter.count); // 1\n\t\t * ```\n\t\t */\n\t},\n\t/**\n\t * @function can-construct.ReturnValue ReturnValue\n\t * @parent can-construct.static\n\t *\n\t * Use to overwrite the return value of new Construct(...).\n\t *\n\t * @signature `new Construct.ReturnValue( value )`\n\t *\n\t * This constructor function can be used for creating a return value of the `setup` method.\n\t * [can-construct] will check if the return value is an instance of `Construct.ReturnValue`.\n\t * If it is then its `value` will be used as the new instance.\n\t *\n\t * @param {Object} value A value to be used for a new instance instead of a new object.\n\t *\n\t * ```js\n\t * var Student = function( name, school ){\n\t * this.name = name;\n\t * this.school = school;\n\t * }\n\t *\n\t * var Person = Construct.extend({\n\t * setup: function( options ){\n\t * if (options.school){\n\t * return new Constructor.ReturnValue( new Student( options.name, options.school ) );\n\t * } else {\n\t * return [options];\n\t * }\n\t * }\n\t * });\n\t *\n\t * var myPerson = new Person( {name: \"Ilya\", school: \"PetrSU\"} );\n\t *\n\t * myPerson instanceof Student // => true\n\t * ```\n */\n\tReturnValue: function(value){\n\t\tthis.value = value;\n\t}\n});\n/**\n * @function can-construct.prototype.setup setup\n * @parent can-construct.prototype\n *\n * @signature `construct.setup(...args)`\n *\n * A setup function for the instantiation of a constructor function.\n *\n * @param {*} args The arguments passed to the constructor.\n *\n * @return {Array|undefined|can-construct.ReturnValue} If an array is returned, the array's items are passed as\n * arguments to [can-construct::init init]. If a [can-construct.ReturnValue] instance is returned, the ReturnValue\n * instance's value will be returned as the result of calling new Construct(). The following example always makes\n * sure that init is called with a jQuery wrapped element:\n *\n * ```js\n * \tWidgetFactory = Construct.extend({\n * \t\t\tsetup: function(element){\n * \t\t\t\t\treturn [$(element)]\n * \t\t\t}\n * \t});\n *\n * \tMyWidget = WidgetFactory.extend({\n * \t\t\tinit: function($el){\n * \t\t\t\t\t$el.html(\"My Widget!!\")\n * \t\t\t}\n * \t});\n * ```\n *\n * Otherwise, the arguments to the\n * constructor are passed to [can-construct::init] and the return value of `setup` is discarded.\n *\n * @body\n *\n * ## Deciding between `setup` and `init`\n *\n *\n * Usually, you should use [can-construct::init init] to do your constructor function's initialization.\n * You should, instead, use `setup` when:\n *\n * - there is initialization code that you want to run before the inheriting constructor's\n * `init` method is called.\n * - there is initialization code that should run whether or not inheriting constructors\n * call their base's `init` methods.\n * - you want to modify the arguments that will get passed to `init`.\n *\n */\ndefineNonEnumerable(Construct.prototype, \"setup\", function () {});\n/**\n * @function can-construct.prototype.init init\n * @parent can-construct.prototype\n *\n * @description Called when a new instance of a Construct is created.\n *\n * @signature `construct.init(...args)`\n * @param {*} args the arguments passed to the constructor (or the items of the array returned from [can-construct::setup])\n *\n * @body\n * If a prototype `init` method is provided, `init` is called when a new Construct is created---\n * after [can-construct::setup]. The `init` method is where the bulk of your initialization code\n * should go. A common thing to do in `init` is save the arguments passed into the constructor.\n *\n * ## Examples\n *\n * First, we'll make a Person constructor that has a first and last name:\n *\n * ```js\n * var Person = Construct.extend({\n * init: function(first, last) {\n * this.first = first;\n * this.last = last;\n * }\n * });\n *\n * var justin = new Person(\"Justin\", \"Meyer\");\n * justin.first; // \"Justin\"\n * justin.last; // \"Meyer\"\n * ```\n *\n * Then, we'll extend Person into Programmer, and add a favorite language:\n *\n * ```js\n * var Programmer = Person.extend({\n * init: function(first, last, language) {\n * // call base's init\n * Person.prototype.init.apply(this, arguments);\n *\n * // other initialization code\n * this.language = language;\n * },\n * bio: function() {\n * return \"Hi! I'm \" + this.first + \" \" + this.last +\n * \" and I write \" + this.language + \".\";\n * }\n * });\n *\n * var brian = new Programmer(\"Brian\", \"Moschel\", 'ECMAScript');\n * brian.bio(); // \"Hi! I'm Brian Moschel and I write ECMAScript.\";\n * ```\n *\n * ## Modified Arguments\n *\n * [can-construct::setup] is able to modify the arguments passed to `init`.\n * If you aren't receiving the arguments you passed to `new Construct(args)`,\n * check that they aren't being changed by `setup` along\n * the inheritance chain.\n */\ndefineNonEnumerable(Construct.prototype, \"init\", function () {});\n\nvar canConstruct_3_5_7_canConstruct = canNamespace_1_0_0_canNamespace.Construct = Construct;\n\nfunction dispatch(key) {\n\t// jshint -W040\n\tvar handlers = this.eventHandlers[key];\n\tif (handlers) {\n\t\tvar handlersCopy = handlers.slice();\n\t\tvar value = this.getKeyValue(key);\n\t\tfor (var i = 0; i < handlersCopy.length; i++) {\n\t\t\thandlersCopy[i](value);\n\t\t}\n\t}\n}\n\nfunction Globals() {\n\tthis.eventHandlers = {};\n\tthis.properties = {};\n}\n\n/**\n * @function define \n * @parent can-globals/methods\n * \n * Create a new global environment variable.\n * \n * @signature `globals.define(key, value[, cache])`\n * \n * Defines a new global called `key`, who's value defaults to `value`.\n * \n * The following example defines the `global` key's default value to the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window) object:\n * ```javascript\n * globals.define('global', window);\n * globals.getKeyValue('window') //-> window\n * ```\n * \n * If a function is provided and `cache` is falsy, that function is run every time the key value is read:\n * ```javascript\n * globals.define('isBrowserWindow', function() {\n * console.log('EVALUATING')\n * return typeof window !== 'undefined' &&\n * typeof document !== 'undefined' && typeof SimpleDOM === 'undefined'\n * }, false);\n * globals.get('isBrowserWindow') // logs 'EVALUATING'\n * // -> true\n * globals.get('isBrowserWindow') // logs 'EVALUATING' again\n * // -> true\n * ```\n * \n * If a function is provided and `cache` is truthy, that function is run only the first time the value is read:\n * ```javascript\n * globals.define('isWebkit', function() {\n * console.log('EVALUATING')\n * var div = document.createElement('div')\n * return 'WebkitTransition' in div.style\n * })\n * globals.getKeyValue('isWebkit') // logs 'EVALUATING'\n * \t\t\t\t\t\t\t\t // -> true\n * globals.getKeyValue('isWebkit') // Does NOT log again!\n * \t\t\t\t\t\t\t\t // -> true\n * ```\n * \n * @param {String} key\n * The key value to create.\n * \n * @param {*} value\n * The default value. If this is a function, its return value will be used.\n * \n * @param {Boolean} [cache=true]\n * Enable cache. If false the `value` function is run every time the key value is read.\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.define = function (key, value, enableCache) {\n\tif (enableCache === undefined) {\n\t\tenableCache = true;\n\t}\n\tif (!this.properties[key]) {\n\t\tthis.properties[key] = {\n\t\t\tdefault: value,\n\t\t\tvalue: value,\n\t\t\tenableCache: enableCache\n\t\t};\n\t}\n\treturn this;\n};\n\n/**\n * @function getKeyValue \n * @parent can-globals/methods\n * \n * Get a global environment variable by name.\n * \n * @signature `globals.getKeyValue(key)`\n * \n * Returns the current value at `key`. If no value has been set, it will return the default value (if it is not a function). If the default value is a function, it will return the output of the function. This execution is cached if the cache flag was set on initialization.\n * \n * ```javascript\n * globals.define('foo', 'bar');\n * globals.getKeyValue('foo'); //-> 'bar'\n * ```\n * \n * @param {String} key\n * The key value to access.\n * \n * @return {*}\n * Returns the value of a given key.\n */\nGlobals.prototype.getKeyValue = function (key) {\n\tvar property = this.properties[key];\n\tif (property) {\n\t\tif (typeof property.value === 'function') {\n\t\t\tif (property.cachedValue) {\n\t\t\t\treturn property.cachedValue;\n\t\t\t}\n\t\t\tif (property.enableCache) {\n\t\t\t\tproperty.cachedValue = property.value();\n\t\t\t\treturn property.cachedValue;\n\t\t\t} else {\n\t\t\t\treturn property.value();\n\t\t\t}\n\t\t}\n\t\treturn property.value;\n\t}\n};\n\nGlobals.prototype.makeExport = function (key) {\n\treturn function (value) {\n\t\tif (arguments.length === 0) {\n\t\t\treturn this.getKeyValue(key);\n\t\t}\n\n\t\tif (typeof value === 'undefined' || value === null) {\n\t\t\tthis.deleteKeyValue(key);\n\t\t} else {\n\t\t\tif (typeof value === 'function') {\n\t\t\t\tthis.setKeyValue(key, function () {\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.setKeyValue(key, value);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}.bind(this);\n};\n\n/**\n * @function offKeyValue \n * @parent can-globals/methods\n * \n * Remove handler from event queue.\n * \n * @signature `globals.offKeyValue(key, handler)`\n * \n * Removes `handler` from future change events for `key`.\n * \n * \n * ```javascript\n * var handler = (value) => {\n * value === 'baz' //-> true\n * };\n * globals.define('foo', 'bar');\n * globals.onKeyValue('foo', handler);\n * globals.setKeyValue('foo', 'baz');\n * globals.offKeyValue('foo', handler);\n * ```\n * \n * @param {String} key\n * The key value to observe.\n * \n * @param {Function} handler([value])\n * The observer callback.\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.offKeyValue = function (key, handler) {\n\tif (this.properties[key]) {\n\t\tvar handlers = this.eventHandlers[key];\n\t\tif (handlers) {\n\t\t\tvar i = handlers.indexOf(handler);\n\t\t\thandlers.splice(i, 1);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * @function onKeyValue \n * @parent can-globals/methods\n * \n * Add handler to event queue.\n * \n * @signature `globals.onKeyValue(key, handler)`\n * \n * Calls `handler` each time the value of `key` is set or reset.\n * \n * ```javascript\n * globals.define('foo', 'bar');\n * globals.onKeyValue('foo', (value) => {\n * value === 'baz' //-> true\n * });\n * globals.setKeyValue('foo', 'baz');\n * ```\n * \n * @param {String} key\n * The key value to observe.\n * \n * @param {function(*)} handler([value])\n * The observer callback.\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.onKeyValue = function (key, handler) {\n\tif (this.properties[key]) {\n\t\tif (!this.eventHandlers[key]) {\n\t\t\tthis.eventHandlers[key] = [];\n\t\t}\n\t\tthis.eventHandlers[key].push(handler);\n\t}\n\treturn this;\n};\n\n/**\n * @function deleteKeyValue \n * @parent can-globals/methods\n * \n * Reset global environment variable.\n * \n * @signature `globals.deleteKeyValue(key)`\n * \n * Deletes the current value at `key`. Future `get`s will use the default value.\n * \n * ```javascript\n * globals.define('global', window);\n * globals.setKeyValue('global', {});\n * globals.deleteKeyValue('global');\n * globals.getKeyValue('global') === window; //-> true\n * ```\n * \n * @param {String} key\n * The key value to access.\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.deleteKeyValue = function (key) {\n\tvar property = this.properties[key];\n\tif (property !== undefined) {\n\t\tproperty.value = property.default;\n\t\tproperty.cachedValue = undefined;\n\t\tdispatch.call(this, key);\n\t}\n\treturn this;\n};\n\n/**\n * @function setKeyValue \n * @parent can-globals/methods\n * \n * Overwrite an existing global environment variable.\n * \n * @signature `globals.setKeyValue(key, value)`\n * \n * ```javascript\n * globals.define('foo', 'bar');\n * globals.setKeyValue('foo', 'baz');\n * globals.getKeyValue('foo'); //-> 'baz'\n * ```\n * \n * Sets the new value at `key`. Will override previously set values, but preserves the default (see `deleteKeyValue`).\n * \n * Setting a key which was not previously defined will call `define` with the key and value.\n * \n * @param {String} key\n * The key value to access.\n * \n * @param {*} value\n * The new value.\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.setKeyValue = function (key, value) {\n\tif (!this.properties[key]) {\n\t\treturn this.define(key, value);\n\t}\n\tvar property = this.properties[key];\n\tproperty.value = value;\n\tproperty.cachedValue = undefined;\n\tdispatch.call(this, key);\n\treturn this;\n};\n\n/**\n * @function reset \n * @parent can-globals/methods\n * \n * Reset all keys to their default value and clear their caches.\n * \n * @signature `globals.setKeyValue(key, value)`\n * \n * ```javascript\n * globals.define('foo', 'bar');\n * globals.setKeyValue('foo', 'baz');\n * globals.getKeyValue('foo'); //-> 'baz'\n * globals.reset();\n * globals.getKeyValue('foo'); //-> 'bar'\n * ```\n * \n * @return {can-globals}\n * Returns the instance of `can-globals` for chaining.\n */\nGlobals.prototype.reset = function () {\n\tfor (var key in this.properties) {\n\t\tif (this.properties.hasOwnProperty(key)) {\n\t\t\tthis.properties[key].value = this.properties[key].default;\n\t\t\tthis.properties[key].cachedValue = undefined;\n\t\t\tdispatch.call(this, key);\n\t\t}\n\t}\n\treturn this;\n};\n\ncanReflect_1_19_2_canReflect.assignSymbols(Globals.prototype, {\n\t'can.getKeyValue': Globals.prototype.getKeyValue,\n\t'can.setKeyValue': Globals.prototype.setKeyValue,\n\t'can.deleteKeyValue': Globals.prototype.deleteKeyValue,\n\t'can.onKeyValue': Globals.prototype.onKeyValue,\n\t'can.offKeyValue': Globals.prototype.offKeyValue\n});\n\nvar canGlobals_1_2_2_canGlobalsProto = Globals;\n\nvar canGlobals_1_2_2_canGlobalsInstance = createCommonjsModule(function (module) {\n\n\nvar globals = new canGlobals_1_2_2_canGlobalsProto();\n\nif (canNamespace_1_0_0_canNamespace.globals) {\n\tthrow new Error(\"You can't have two versions of can-globals, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.globals = globals;\n}\n});\n\n/* global self */\n/* global WorkerGlobalScope */\n\n\n\n/**\n * @module {function} can-globals/global/global global\n * @parent can-globals/modules\n * \n * Get the global object for the current context.\n * \n * @signature `GLOBAL([newGlobal])`\n *\n * Optionally sets, and returns the global that this environment provides. It will be one of:\n * \n * ```js\n * var GLOBAL = require('can-globals/global/global');\n * var g = GLOBAL();\n * // In a browser\n * console.log(g === window); // -> true\n * ```\n *\n * - **Browser**: [`window`](https://developer.mozilla.org/en-US/docs/Web/API/window)\n * - **Web Worker**: [`self`](https://developer.mozilla.org/en-US/docs/Web/API/Window/self)\n * - **Node.js**: [`global`](https://nodejs.org/api/globals.html#globals_global)\n * \n * @param {Object} [newGlobal] An optional global-like object to set as the context's global \n *\n * @return {Object} The global object for this JavaScript environment.\n */\ncanGlobals_1_2_2_canGlobalsInstance.define('global', function(){\n\t// Web Worker\n\treturn (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) ? self :\n\n\t\t// Node.js\n\t\ttypeof process === 'object' &&\n\t\t{}.toString.call(process) === '[object process]' ? commonjsGlobal :\n\n\t\t// Browser window\n\t\twindow;\n});\n\nvar global_1 = canGlobals_1_2_2_canGlobalsInstance.makeExport('global');\n\n/**\n * @module {function} can-globals/document/document document\n * @parent can-globals/modules\n * \n * Get the global [`document`](https://developer.mozilla.org/en-US/docs/Web/API/document) object for the current context.\n * \n * @signature `DOCUMENT([newDocument])`\n * \n * Optionally sets, and returns, the [`document`](https://developer.mozilla.org/en-US/docs/Web/API/document) object for the context.\n * \n * ```js\n * var documentShim = { getElementById() {...} };\n * var DOCUMENT = require('can-globals/document/document');\n * DOCUMENT(documentShim); //-> document\n * DOCUMENT().getElementById('foo');\n * ```\n *\n * @param {Object} [newDocument] An optional document-like object to set as the context's document \n * \n * @return {Object} The window object for this JavaScript environment.\n */\ncanGlobals_1_2_2_canGlobalsInstance.define('document', function(){\n\treturn canGlobals_1_2_2_canGlobalsInstance.getKeyValue('global').document;\n});\n\nvar document$1 = canGlobals_1_2_2_canGlobalsInstance.makeExport('document');\n\n/**\n * @module {function} can-globals/is-node/is-node is-node\n * @parent can-globals/modules\n * @description Determines if your code is running in [Node.js](https://nodejs.org).\n * @signature `isNode()`\n *\n * ```js\n * var isNode = require(\"can-globals/is-node/is-node\");\n * var GLOBAL = require(\"can-globals/global/global\");\n *\n * if(isNode()) {\n * console.log(GLOBAL() === global); // -> true\n * }\n * ```\n *\n * @return {Boolean} True if running in Node.js\n */\n\ncanGlobals_1_2_2_canGlobalsInstance.define('isNode', function(){\n\treturn typeof process === \"object\" &&\n\t\t{}.toString.call(process) === \"[object process]\";\n});\n\nvar isNode = canGlobals_1_2_2_canGlobalsInstance.makeExport('isNode');\n\n// This module depends on isNode being defined\n\n\n/**\n * @module {function} can-globals/is-browser-window/is-browser-window is-browser-window\n * @parent can-globals/modules\n * @signature `isBrowserWindow()`\n *\n * Returns `true` if the code is running within a Browser window. Use this function if you need special code paths for when running in a Browser window, a Web Worker, or another environment (such as Node.js).\n *\n * ```js\n * var isBrowserWindow = require(\"can-globals/is-browser-window/is-browser-window\");\n * var GLOBAL = require(\"can-globals/global/global\");\n *\n * if(isBrowserWindow()) {\n * console.log(GLOBAL() === window); // -> true\n * }\n * ```\n *\n * @return {Boolean} True if the environment is a Browser window.\n */\n\ncanGlobals_1_2_2_canGlobalsInstance.define('isBrowserWindow', function(){\n\tvar isNode = canGlobals_1_2_2_canGlobalsInstance.getKeyValue('isNode');\n\treturn typeof window !== \"undefined\" &&\n\t\ttypeof document !== \"undefined\" &&\n\t\tisNode === false;\n});\n\nvar isBrowserWindow = canGlobals_1_2_2_canGlobalsInstance.makeExport('isBrowserWindow');\n\nfunction getTargetDocument (target) {\n\treturn target.ownerDocument || document$1();\n}\n\nfunction createEvent (target, eventData, bubbles, cancelable) {\n\tvar doc = getTargetDocument(target);\n\tvar event = doc.createEvent('HTMLEvents');\n\tvar eventType;\n\tif (typeof eventData === 'string') {\n\t\teventType = eventData;\n\t} else {\n\t\teventType = eventData.type;\n\t\tfor (var prop in eventData) {\n\t\t\tif (event[prop] === undefined) {\n\t\t\t\tevent[prop] = eventData[prop];\n\t\t\t}\n\t\t}\n\t}\n\tif (bubbles === undefined) {\n\t\tbubbles = true;\n\t}\n\tevent.initEvent(eventType, bubbles, cancelable);\n\treturn event;\n}\n\n// We do not account for all EventTarget classes,\n// only EventTarget DOM nodes, fragments, and the window.\nfunction isDomEventTarget (obj) {\n\tif (!(obj && obj.nodeName)) {\n\t\treturn obj === window;\n\t}\n\tvar nodeType = obj.nodeType;\n\treturn (\n\t\tnodeType === 1 || // Node.ELEMENT_NODE\n\t\tnodeType === 9 || // Node.DOCUMENT_NODE\n\t\tnodeType === 11 // Node.DOCUMENT_FRAGMENT_NODE\n\t);\n}\n\nfunction addDomContext (context, args) {\n\tif (isDomEventTarget(context)) {\n\t\targs = Array.prototype.slice.call(args, 0);\n\t\targs.unshift(context);\n\t}\n\treturn args;\n}\n\nfunction removeDomContext (context, args) {\n\tif (!isDomEventTarget(context)) {\n\t\targs = Array.prototype.slice.call(args, 0);\n\t\tcontext = args.shift();\n\t}\n\treturn {\n\t\tcontext: context,\n\t\targs: args\n\t};\n}\n\nvar fixSyntheticEventsOnDisabled = false;\n// In FireFox, dispatching a synthetic event on a disabled element throws an error.\n// Other browsers, like IE 10 do not dispatch synthetic events on disabled elements at all.\n// This determines if we have to work around that when dispatching events.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=329509\n(function() {\n\tif(!isBrowserWindow()) {\n\t\treturn;\n\t}\n\n\tvar testEventName = 'fix_synthetic_events_on_disabled_test';\n\tvar input = document.createElement(\"input\");\n\tinput.disabled = true;\n\tvar timer = setTimeout(function() {\n\t\tfixSyntheticEventsOnDisabled = true;\n\t}, 50);\n\tvar onTest = function onTest (){\n\t\tclearTimeout(timer);\n\t\tinput.removeEventListener(testEventName, onTest);\n\t};\n\tinput.addEventListener(testEventName, onTest);\n\ttry {\n\t\tvar event = document.create('HTMLEvents');\n\t\tevent.initEvent(testEventName, false);\n\t\tinput.dispatchEvent(event);\n\t} catch(e) {\n\t\tonTest();\n\t\tfixSyntheticEventsOnDisabled = true;\n\t}\n})();\n\nfunction isDispatchingOnDisabled(element, event) {\n\tvar eventType = event.type;\n\tvar isInsertedOrRemoved = eventType === 'inserted' || eventType === 'removed';\n\tvar isDisabled = !!element.disabled;\n\treturn isInsertedOrRemoved && isDisabled;\n}\n\nfunction forceEnabledForDispatch (element, event) {\n\treturn fixSyntheticEventsOnDisabled && isDispatchingOnDisabled(element, event);\n}\n\nvar util = {\n\tcreateEvent: createEvent,\n\taddDomContext: addDomContext,\n\tremoveDomContext: removeDomContext,\n\tisDomEventTarget: isDomEventTarget,\n\tgetTargetDocument: getTargetDocument,\n\tforceEnabledForDispatch: forceEnabledForDispatch\n};\n\nfunction EventRegistry () {\n\tthis._registry = {};\n}\n\n/**\n * @module can-dom-events/helpers/make-event-registry\n * @parent can-dom-events.helpers\n * @description Create an event registry.\n * @signature `makeEventRegistry()`\n * @return {can-dom-events/EventRegistry}\n * @hide\n * \n * @body\n *\n * ```js\n * var makeEventRegistry = require('can-dom-events/helpers/make-event-registry');\n * var registry = makeEventRegistry();\n *\n * var radioChange = require('can-events-dom-radiochange');\n * var removeRadioChange = registry.add(radioChange);\n *\n * registry.has('radiochange'); // => true\n * registry.get('radiochange'); // => radioChange\n *\n * removeRadioChange();\n * ```\n */\nvar makeEventRegistry = function makeEventRegistry () {\n\treturn new EventRegistry();\n};\n\n/**\n * @function make-event-registry.has eventRegistry.has\n *\n * Check whether an event type has already been registered.\n *\n * @signature `eventRegistry.has( eventType )`\n * @parent can-dom-events/EventRegistry\n * @param {String} eventType The event type for which to check.\n * @return {Boolean} Whether the event type is registered.\n*/\nEventRegistry.prototype.has = function (eventType) {\n\treturn !!this._registry[eventType];\n};\n\n/**\n * @function make-event-registry.get eventRegistry.get\n *\n * Retrieve an event type which has already been registered.\n *\n * @signature `eventRegistry.get( eventType )`\n * @parent can-dom-events/EventRegistry\n * @param {String} eventType The event type for which to retrieve.\n * @return {EventDefinition} The registered event definition, or undefined if unregistered.\n*/\nEventRegistry.prototype.get = function (eventType) {\n\treturn this._registry[eventType];\n};\n\n/**\n * @function make-event-registry.add eventRegistry.add\n *\n * Add an event to the registry.\n *\n * @signature `eventRegistry.add( event [, eventType ] )`\n * @parent can-dom-events/EventRegistry\n * @param {EventDefinition} event The event definition to register.\n * @param {String} eventType The event type with which to register the event.\n * @return {function} The callback to remove the event from the registry.\n*/\nEventRegistry.prototype.add = function (event, eventType) {\n\tif (!event) {\n\t\tthrow new Error('An EventDefinition must be provided');\n\t}\n\tif (typeof event.addEventListener !== 'function') {\n\t\tthrow new TypeError('EventDefinition addEventListener must be a function');\n\t}\n\tif (typeof event.removeEventListener !== 'function') {\n\t\tthrow new TypeError('EventDefinition removeEventListener must be a function');\n\t}\n\n\teventType = eventType || event.defaultEventType;\n\tif (typeof eventType !== 'string') {\n\t\tthrow new TypeError('Event type must be a string, not ' + eventType);\n\t}\n\n\tif (this.has(eventType)) {\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tdev.warn('Event \"' + eventType + '\" is already registered');\n\t\t\t\treturn;\n\t\t}\n\n\t\tthrow new Error('Event \"' + eventType + '\" is already registered');\n\t}\n\n\tthis._registry[eventType] = event;\n\tvar self = this;\n\treturn function remove () {\n\t\tself._registry[eventType] = undefined;\n\t};\n};\n\n// Some events do not bubble, so delegating them requires registering the handler in the\n// capturing phase.\n// http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html\nvar useCapture = function(eventType) {\n\treturn eventType === 'focus' || eventType === 'blur';\n};\n\nfunction makeDelegator (domEvents) {\n\tvar Delegator = function Delegator (parentKey){\n\t\tthis.element = parentKey; // HTMLElement\n\t\tthis.events = {}; // {[eventType: string]: Array<(event) -> void>}\n\t\tthis.delegated = {}; // {[eventType: string]: (event) -> void}\n\t};\n\n\tcanReflect_1_19_2_canReflect.assignSymbols( Delegator.prototype, {\n\t\t\"can.setKeyValue\": function(eventType, handlersBySelector){\n\t\t\tvar handler = this.delegated[eventType] = function(ev){\n\t\t\t\tvar cur = ev.target;\n\t\t\t\tvar propagate = true;\n\t\t\t\tvar origStopPropagation = ev.stopPropagation;\n\t\t\t\tev.stopPropagation = function() {\n\t\t\t\t\torigStopPropagation.apply(this, arguments);\n\t\t\t\t\tpropagate = false;\n\t\t\t\t};\n\t\t\t\tvar origStopImmediatePropagation = ev.stopImmediatePropagation;\n\t\t\t\tev.stopImmediatePropagation = function() {\n\t\t\t\t\torigStopImmediatePropagation.apply(this, arguments);\n\t\t\t\t\tpropagate = false;\n\t\t\t\t};\n\t\t\t\tdo {\n\t\t\t\t\t// document does not implement `.matches` but documentElement does\n\t\t\t\t\tvar el = cur === document ? document.documentElement : cur;\n\t\t\t\t\tvar matches = el.matches || el.msMatchesSelector;\n\n\t\t\t\t\tcanReflect_1_19_2_canReflect.each(handlersBySelector, function(handlers, selector){\n\t\t\t\t\t\t// Text and comment nodes may be included in mutation event targets\n\t\t\t\t\t\t// but will never match selectors (and do not implement matches)\n\t\t\t\t\t\tif (matches && matches.call(el, selector)) {\n\t\t\t\t\t\t\thandlers.forEach(function(handler){\n\t\t\t\t\t\t\t\thandler.call(el, ev);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t// since `el` points to `documentElement` when `cur` === document,\n\t\t\t\t\t// we need to continue using `cur` as the loop pointer, otherwhise\n\t\t\t\t\t// it will never end as documentElement.parentNode === document\n\t\t\t\t\tcur = cur.parentNode;\n\t\t\t\t} while ((cur && cur !== ev.currentTarget) && propagate);\n\t\t\t};\n\t\t\tthis.events[eventType] = handlersBySelector;\n\t\t\tdomEvents.addEventListener(this.element, eventType, handler, useCapture(eventType));\n\t\t},\n\t\t\"can.getKeyValue\": function(eventType) {\n\t\t\treturn this.events[eventType];\n\t\t},\n\t\t\"can.deleteKeyValue\": function(eventType) {\n\t\t\tdomEvents.removeEventListener(this.element, eventType, this.delegated[eventType], useCapture(eventType));\n\t\t\tdelete this.delegated[eventType];\n\t\t\tdelete this.events[eventType];\n\t\t},\n\t\t\"can.getOwnEnumerableKeys\": function() {\n\t\t\treturn Object.keys(this.events);\n\t\t}\n\t});\n\n\treturn Delegator;\n}\n\nvar MakeDelegateEventTree = function makeDelegateEventTree (domEvents) {\n\tvar Delegator = makeDelegator(domEvents);\n\treturn new canKeyTree_1_2_2_canKeyTree([Map, Delegator, Object, Array]);\n};\n\nvar domEvents = {\n\t_eventRegistry: makeEventRegistry(),\n\n\t/**\n\t* @function can-dom-events.addEvent addEvent\n\t* @parent can-dom-events.static\n\t*\n\t* Add a custom event to the global event registry.\n\t*\n\t* @signature `addEvent( event [, eventType ] )`\n\t*\n\t* ```js\n\t* var removeReturnEvent = domEvents.addEvent(enterEvent, \"return\");\n\t* ```\n\t*\n\t* @param {can-dom-events/EventDefinition} event The custom event definition.\n\t* @param {String} eventType The event type to associated with the custom event.\n\t* @return {function} The callback to remove the custom event from the registry.\n\t*/\n\taddEvent: function(event, eventType) {\n\t\treturn this._eventRegistry.add(event, eventType);\n\t},\n\n\t/**\n\t* @function can-dom-events.addEventListener addEventListener\n\t*\n\t* Add an event listener for eventType to the target.\n\t*\n\t* @signature `addEventListener( target, eventType, ...eventArgs )`\n\t* @parent can-dom-events.static\n\t* @param {DomEventTarget} target The object to which to add the listener.\n\t* @param {String} eventType The event type with which to register.\n\t* @param {*} eventArgs The arguments which configure the associated event's behavior. This is usually a\n\t* function event handler.\n\t*/\n\taddEventListener: function(target, eventType) {\n\t\tvar hasCustomEvent = domEvents._eventRegistry.has(eventType);\n\t\tif (hasCustomEvent) {\n\t\t\tvar event = domEvents._eventRegistry.get(eventType);\n\t\t\treturn event.addEventListener.apply(domEvents, arguments);\n\t\t}\n\n\t\tvar eventArgs = Array.prototype.slice.call(arguments, 1);\n\t\treturn target.addEventListener.apply(target, eventArgs);\n\t},\n\n\t/**\n\t* @function can-dom-events.removeEventListener removeEventListener\n\t*\n\t* Remove an event listener for eventType from the target.\n\t*\n\t* @signature `removeEventListener( target, eventType, ...eventArgs )`\n\t* @parent can-dom-events.static\n\t* @param {DomEventTarget} target The object from which to remove the listener.\n\t* @param {String} eventType The event type with which to unregister.\n\t* @param {*} eventArgs The arguments which configure the associated event's behavior. This is usually a\n\t* function event handler.\n\t*/\n\tremoveEventListener: function(target, eventType) {\n\t\tvar hasCustomEvent = domEvents._eventRegistry.has(eventType);\n\t\tif (hasCustomEvent) {\n\t\t\tvar event = domEvents._eventRegistry.get(eventType);\n\t\t\treturn event.removeEventListener.apply(domEvents, arguments);\n\t\t}\n\n\t\tvar eventArgs = Array.prototype.slice.call(arguments, 1);\n\t\treturn target.removeEventListener.apply(target, eventArgs);\n\t},\n\n\t/**\n\t* @function can-dom-events.addDelegateListener addDelegateListener\n\t*\n\t* Attach a handler for an event for all elements that match the selector,\n\t* now or in the future, based on a root element.\n\t*\n\t* @signature `addDelegateListener( target, eventType, selector, handler )`\n\t*\n\t* ```js\n\t* // Prevents all anchor elements from changing the page\n\t* domEvents.addDelegateListener(document.body,\"click\", \"a\", function(event){\n\t* event.preventDefault();\n\t* })\n\t* ```\n\t* @parent can-dom-events.static\n\t* @param {DomEventTarget} root The html element to listen to events that match selector within.\n\t* @param {String} eventType The event name to listen to.\n\t* @param {String} selector A selector to filter the elements that trigger the event.\n\t* @param {function} handler A function to execute at the time the event is triggered.\n\t*/\n\taddDelegateListener: function(root, eventType, selector, handler) {\n\t\tdomEvents._eventTree.add([root, eventType, selector, handler]);\n\t},\n\t/**\n\t* @function can-dom-events.removeDelegateListener removeDelegateListener\n\t*\n\t* Remove a handler for an event for all elements that match the selector.\n\t*\n\t* @signature `removeDelegateListener( target, eventType, selector, handler )`\n\t*\n\t* ```js\n\t* // Prevents all anchor elements from changing the page\n\t* function handler(event) {\n\t* event.preventDefault();\n\t* }\n\t* domEvents.addDelegateListener(document.body,\"click\", \"a\", handler);\n\t*\n\t* domEvents.removeDelegateListener(document.body,\"click\", \"a\", handler);\n\t* ```\n\t* @parent can-dom-events.static\n\t* @param {DomEventTarget} root The html element to listen to events that match selector within.\n\t* @param {String} eventType The event name to listen to.\n\t* @param {String} selector A selector to filter the elements that trigger the event.\n\t* @param {function} handler A function that was previously passed to `addDelegateListener`.\n\t*/\n\tremoveDelegateListener: function(target, eventType, selector, handler) {\n\t\tdomEvents._eventTree.delete([target, eventType, selector, handler]);\n\t},\n\n\t/**\n\t* @function can-dom-events.dispatch dispatch\n\t*\n\t* Create and dispatch a configured event on the target.\n\t*\n\t* @signature `dispatch( target, eventData [, bubbles ][, cancelable ] )`\n\t* @parent can-dom-events.static\n\t* @param {DomEventTarget} target The object on which to dispatch the event.\n\t* @param {Object | String} eventData The data to be assigned to the event. If it is a string, that will be the event type.\n\t* @param {Boolean} bubbles Whether the event should bubble; defaults to true.\n\t* @param {Boolean} cancelable Whether the event can be cancelled; defaults to false.\n\t* @return {Boolean} notCancelled Whether the event dispatched without being cancelled.\n\t*/\n\tdispatch: function(target, eventData, bubbles, cancelable) {\n\t\tvar event = util.createEvent(target, eventData, bubbles, cancelable);\n\t\tvar enableForDispatch = util.forceEnabledForDispatch(target, event);\n\t\tif(enableForDispatch) {\n\t\t\ttarget.disabled = false;\n\t\t}\n\n\t\tvar ret = target.dispatchEvent(event);\n\t\tif(enableForDispatch) {\n\t\t\ttarget.disabled = true;\n\t\t}\n\n\t\treturn ret;\n\t}\n};\n\ndomEvents._eventTree = MakeDelegateEventTree(domEvents);\n\n\n\n\n\nvar canDomEvents_1_3_13_canDomEvents = canNamespace_1_0_0_canNamespace.domEvents = domEvents;\n\n/**\n * @module {function} can-event-queue/map/map\n * @parent can-event-queue\n * @templateRender true\n *\n * @description Mixin methods and symbols to make this object or prototype object\n * behave like a key-value observable.\n *\n * @signature `mixinMapBindings( obj )`\n *\n * Adds symbols and methods that make `obj` or instances having `obj` on their prototype\n * behave like key-value observables.\n *\n * When `mixinMapBindings` is called on an `obj` like:\n *\n * ```js\n * var mixinMapBindings = require(\"can-event-queue/map/map\");\n *\n * var observable = mixinValueBindings({});\n *\n * observable.on(\"prop\",function(ev, newVal, oldVal){\n * console.log(newVal);\n * });\n *\n * observable[canSymbol.for(\"can.dispatch\")](\"prop\",[2,1]);\n * // Logs: 2\n * ```\n *\n * `mixinMapBindings` adds the following properties and symbols to the object:\n *\n * {{#each (getChildren [can-event-queue/map/map])}}\n * - [{{name}}] - {{description}}{{/each}}\n *\n * Furthermore, `mixinMapBindings` looks for the following symbols on the object's `.constructor`\n * property:\n *\n * - `@can.dispatchInstanceBoundChange` - Called when the bind status of an instance changes.\n * - `@can.dispatchInstanceOnPatches` - Called if [can-event-queue/map/map.dispatch] is called with `event.patches` as an array of\n * patches.\n */\n\n\n\n\n\n\n\nvar isDomEventTarget$1 = util.isDomEventTarget;\n\n\n\nvar metaSymbol = canSymbol_1_7_0_canSymbol.for(\"can.meta\"),\n\tdispatchBoundChangeSymbol = canSymbol_1_7_0_canSymbol.for(\"can.dispatchInstanceBoundChange\"),\n\tdispatchInstanceOnPatchesSymbol = canSymbol_1_7_0_canSymbol.for(\"can.dispatchInstanceOnPatches\"),\n\tonKeyValueSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.onKeyValue\"),\n\toffKeyValueSymbol = canSymbol_1_7_0_canSymbol.for(\"can.offKeyValue\"),\n\tonEventSymbol = canSymbol_1_7_0_canSymbol.for(\"can.onEvent\"),\n\toffEventSymbol = canSymbol_1_7_0_canSymbol.for(\"can.offEvent\"),\n\tonValueSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.onValue\"),\n\toffValueSymbol = canSymbol_1_7_0_canSymbol.for(\"can.offValue\"),\n\tinSetupSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.initializing\");\n\nvar legacyMapBindings;\n\nfunction addHandlers(obj, meta) {\n\tif (!meta.handlers) {\n\t\t// Handlers are organized by:\n\t\t// event name - the type of event bound to\n\t\t// binding type - \"event\" for things that expect an event object (legacy), \"onKeyValue\" for reflective bindings.\n\t\t// queue name - mutate, queue, etc\n\t\t// handlers - the handlers.\n\t\tmeta.handlers = new canKeyTree_1_2_2_canKeyTree([Object, Object, Object, Array], {\n\t\t\tonFirst: function() {\n\t\t\t\tif (obj._eventSetup !== undefined) {\n\t\t\t\t\tobj._eventSetup();\n\t\t\t\t}\n\t\t\t\tvar constructor = obj.constructor;\n\t\t\t\tif(constructor[dispatchBoundChangeSymbol] !== undefined && obj instanceof constructor) {\n\t\t\t\t\tconstructor[dispatchBoundChangeSymbol](obj, true);\n\t\t\t\t}\n\t\t\t\t//queues.enqueueByQueue(getLifecycleHandlers(obj).getNode([]), obj, [true]);\n\t\t\t},\n\t\t\tonEmpty: function() {\n\t\t\t\tif (obj._eventTeardown !== undefined) {\n\t\t\t\t\tobj._eventTeardown();\n\t\t\t\t}\n\t\t\t\tvar constructor = obj.constructor;\n\t\t\t\tif(constructor[dispatchBoundChangeSymbol] !== undefined && obj instanceof constructor) {\n\t\t\t\t\tconstructor[dispatchBoundChangeSymbol](obj, false);\n\t\t\t\t}\n\t\t\t\t//queues.enqueueByQueue(getLifecycleHandlers(obj).getNode([]), obj, [false]);\n\t\t\t}\n\t\t});\n\t}\n\n\tif (!meta.listenHandlers) {\n\t\t// context, eventName (might be undefined), queue, handlers\n\t\tmeta.listenHandlers = new canKeyTree_1_2_2_canKeyTree([Map, Map, Object, Array]);\n\t}\n}\n\n\n// getHandlers returns a KeyTree used for event handling.\n// `handlers` will be on the `can.meta` symbol on the object.\n// Ensure the \"obj\" passed as an argument has an object on @@can.meta\nvar ensureMeta = function ensureMeta(obj) {\n\tvar meta = obj[metaSymbol];\n\n\tif (!meta) {\n\t\tmeta = {};\n\t\tcanReflect_1_19_2_canReflect.setKeyValue(obj, metaSymbol, meta);\n\t}\n\taddHandlers(obj, meta);\n\n\treturn meta;\n};\n\nfunction stopListeningArgumentsToKeys(bindTarget, event, handler, queueName) {\n\tif(arguments.length && canReflect_1_19_2_canReflect.isPrimitive(bindTarget)) {\n\t\tqueueName = handler;\n\t\thandler = event;\n\t\tevent = bindTarget;\n\t\tbindTarget = this.context;\n\t}\n\tif(typeof event === \"function\") {\n\t\tqueueName = handler;\n\t\thandler = event;\n\t\tevent = undefined;\n\t}\n\tif(typeof handler === \"string\") {\n\t\tqueueName = handler;\n\t\thandler = undefined;\n\t}\n\tvar keys = [];\n\tif(bindTarget) {\n\t\tkeys.push(bindTarget);\n\t\tif(event || handler || queueName) {\n\t\t\tkeys.push(event);\n\t\t\tif(queueName || handler) {\n\t\t\t\tkeys.push(queueName || this.defaultQueue);\n\t\t\t\tif(handler) {\n\t\t\t\t\tkeys.push(handler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn keys;\n}\n\n\n// These are the properties we are going to add to objects\nvar props = {\n\t/**\n\t * @function can-event-queue/map/map.dispatch dispatch\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Dispatch event and key binding handlers.\n\t *\n\t * @signature `obj.dispatch(event, [args])`\n\t *\n\t * Dispatches registered [can-event-queue/map/map.addEventListener] and\n\t * [can-event-queue/map/map.can.onKeyValue] value binding handlers.\n\t *\n\t * The following shows dispatching the `property` event and\n\t * `keyValue` handlers:\n\t *\n\t *\n\t * ```js\n\t * var mixinMapBindings = require(\"can-event-queue/map/map\");\n\t *\n\t * var obj = mixinMapBindings({});\n\t *\n\t * obj.addEventListener(\"property\", function(event, newVal){\n\t * event.type //-> \"property\"\n\t * newVal //-> 5\n\t * });\n\t *\n\t * canReflect.onKeyValue(\"property\", function(newVal){\n\t * newVal //-> 5\n\t * })\n\t *\n\t * obj.dispatch(\"property\", [5]);\n\t * ```\n\t *\n\t * > NOTE: Event handlers have an additional `event` argument.\n\t *\n\t * @param {String|Object} event The event to dispatch. If a string is passed,\n\t * it will be used as the `type` of the event that will be dispatched and dispatch matching\n\t * [can-event-queue/map/map.can.onKeyValue] bindings:\n\t *\n\t * ```js\n\t * obs.dispatch(\"key\")\n\t * ```\n\t *\n\t * If `event` is an object, it __MUST__ have a `type` property. The If a string is passed,\n\t * it will be used as the `type` of the event that will be dispatched and dispatch matching\n\t * [can-event-queue/map/map.can.onKeyValue] bindings:\n\t *\n\t * ```js\n\t * obs.dispatch({type: \"key\"})\n\t * ```\n\t *\n\t * The `event` object can also have the following properties and values:\n\t * - __reasonLog__ `{Array}` - The reason this event happened. This will be passed to\n\t * [can-queues.enqueueByQueue] for debugging purposes.\n\t * - __makeMeta__ `{function}` - Details about the handler being called. This will be passed to\n\t * [can-queues.enqueueByQueue] for debugging purposes.\n\t * - __patches__ `{Array}` - The patch objects this event represents. The `.patches` value will be\n\t * passed to the object's `.constructor`'s `@can.dispatchInstanceOnPatches` method.\n\t *\n\t * @param {Array} [args] Additional arguments to pass to event handlers.\n\t * @return {Object} event The resulting event object.\n\t */\n\tdispatch: function(event, args) {\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tif (arguments.length > 4) {\n\t\t\t\tdev.warn('Arguments to dispatch should be an array, not multiple arguments.');\n\t\t\t\targs = Array.prototype.slice.call(arguments, 1);\n\t\t\t}\n\n\t\t\tif (args && !Array.isArray(args)) {\n\t\t\t\tdev.warn('Arguments to dispatch should be an array.');\n\t\t\t\targs = [args];\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\t// Don't send events if initalizing.\n\t\tif (this.__inSetup !== true && this[inSetupSymbol$1] !== true) {\n\t\t\tif (typeof event === 'string') {\n\t\t\t\tevent = {\n\t\t\t\t\ttype: event\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar meta = ensureMeta(this);\n\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tif (!event.reasonLog) {\n\t\t\t\t\tevent.reasonLog = [canReflect_1_19_2_canReflect.getName(this), \"dispatched\", '\"' + event.type + '\"', \"with\"].concat(args);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof meta._log === \"function\") {\n\t\t\t\tmeta._log.call(this, event, args);\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\tvar handlers = meta.handlers;\n\t\t\tvar handlersByType = event.type !== undefined && handlers.getNode([event.type]);\n\t\t\tvar dispatchConstructorPatches = event.patches && this.constructor[dispatchInstanceOnPatchesSymbol];\n\t\t\tvar patchesNode = event.patches !== undefined && handlers.getNode([\"can.patches\",\"onKeyValue\"]);\n\t\t\tvar keysNode = event.keyChanged !== undefined && handlers.getNode([\"can.keys\",\"onKeyValue\"]);\n\t\t\tvar batch = dispatchConstructorPatches || handlersByType || patchesNode || keysNode;\n\t\t\tif ( batch ) {\n\t\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\t}\n\t\t\tif(handlersByType) {\n\t\t\t\tif (handlersByType.onKeyValue) {\n\t\t\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(handlersByType.onKeyValue, this, args, event.makeMeta, event.reasonLog);\n\t\t\t\t}\n\t\t\t\tif (handlersByType.event) {\n\t\t\t\t\tevent.batchNum = canQueues_1_3_2_canQueues.batch.number();\n\t\t\t\t\tvar eventAndArgs = [event].concat(args);\n\t\t\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(handlersByType.event, this, eventAndArgs, event.makeMeta, event.reasonLog);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(keysNode) {\n\t\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(keysNode, this, [event.keyChanged], event.makeMeta, event.reasonLog);\n\t\t\t}\n\t\t\tif(patchesNode) {\n\t\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(patchesNode, this, [event.patches], event.makeMeta, event.reasonLog);\n\t\t\t}\n\t\t\tif(dispatchConstructorPatches) {\n\t\t\t\tthis.constructor[dispatchInstanceOnPatchesSymbol](this, event.patches);\n\t\t\t}\n\t\t\tif ( batch ) {\n\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t}\n\t\t}\n\t\treturn event;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.addEventListener addEventListener\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Register an event handler to be called when an event is dispatched.\n\t *\n\t * @signature `obj.addEventListener(eventName, handler(event, ...) [,queueName] )`\n\t *\n\t * Add a event listener to an object. Handlers attached by `.addEventListener` get\n\t * called back with the [can-event-queue/map/map.dispatch]\n\t * `event` object and any arguments used to dispatch. [can-event-queue/map/map.can.onKeyValue] bindings do\n\t * not get the event object.\n\t *\n\t * ```js\n\t * var mixinMapBindings = require(\"can-event-queue/map/map\");\n\t *\n\t * var obj = mixinMapBindings({});\n\t *\n\t * obj.addEventListener(\"foo\", function(event){ ... });\n\t * ```\n\t *\n\t * @param {String} eventName The name of the event to listen for.\n\t * @param {Function} handler(event,arg...) The handler that will be executed to handle the event. The handler will be called\n\t * with the dispatched `event` and `args`.\n\t * @param {String} [queueName='mutate'] The name of the [can-queues] queue the handler will called\n\t * back within. Defaults to `\"mutate\"`.\n\t * @return {Object} Returns the object `.addEventListener` was called on.\n\t *\n\t */\n\taddEventListener: function(key, handler, queueName) {\n\t\tensureMeta(this).handlers.add([key, \"event\", queueName || \"mutate\", handler]);\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.removeEventListener removeEventListener\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Unregister an event handler to be called when an event is dispatched.\n\t *\n\t * @signature `obj.removeEventListener(eventName, [handler [,queueName]] )`\n\t *\n\t * Removes one or more handlers from being called when `eventName`\n\t * is [can-event-queue/map/map.dispatch]ed.\n\t *\n\t * ```js\n\t * // Removes `handler` if it is in the notify queue.\n\t * obj.removeEventListener(\"closed\", handler, \"notify\")\n\t *\n\t * // Removes `handler` if it is in the mutate queue.\n\t * obj.removeEventListener(\"closed\", handler)\n\t *\n\t * // Removes all \"closed\" handlers.\n\t * obj.removeEventListener(\"closed\")\n\t * ```\n\t *\n\t * @param {String} eventName The name of the event to remove. If not specified, all events are removed.\n\t * @param {Function} [handler] The handler that will be removed from the event. If not specified, all handlers for the event are removed.\n\t * @param {String} [queueName='mutate'] The name of the [can-queues] queue the handler was registered on. Defaults to `\"mutate\"`.\n\t * @return {Object} Returns the object `.removeEventListener` was called on.\n\t */\n\tremoveEventListener: function(key, handler, queueName) {\n\t\tif(key === undefined) {\n\t\t\t// This isn't super fast, but this pattern isn't used much.\n\t\t\t// We could re-arrange the tree so it would be faster.\n\t\t\tvar handlers = ensureMeta(this).handlers;\n\t\t\tvar keyHandlers = handlers.getNode([]);\n\t\t\tObject.keys(keyHandlers).forEach(function(key){\n\t\t\t\thandlers.delete([key,\"event\"]);\n\t\t\t});\n\t\t} else if (!handler && !queueName) {\n\t\t\tensureMeta(this).handlers.delete([key, \"event\"]);\n\t\t} else if (!handler) {\n\t\t\tensureMeta(this).handlers.delete([key, \"event\", queueName || \"mutate\"]);\n\t\t} else {\n\t\t\tensureMeta(this).handlers.delete([key, \"event\", queueName || \"mutate\", handler]);\n\t\t}\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.one one\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Register an event handler that gets called only once.\n\t *\n\t * @signature `obj.one(event, handler(event, args...) )`\n\t *\n\t * Adds a basic event listener that listens to an event once and only once.\n\t *\n\t * ```js\n\t * obj.one(\"prop\", function(){\n\t * console.log(\"prop dispatched\");\n\t * })\n\t *\n\t * obj[canSymbol.for(\"prop\")](\"prop\") //-> logs \"prop dispatched\"\n\t * obj[canSymbol.for(\"prop\")](\"prop\")\n\t * ```\n\t *\n\t * @param {String} eventName The name of the event to listen to.\n\t * @param {Function} handler(event, args...) The handler that will be run when the\n\t * event is dispached.\n\t * @return {Object} this\n\t */\n\tone: function(event, handler) {\n\t\t// Unbind the listener after it has been executed\n\t\tvar one = function() {\n\t\t\tlegacyMapBindings.off.call(this, event, one);\n\t\t\treturn handler.apply(this, arguments);\n\t\t};\n\n\t\t// Bind the altered listener\n\t\tlegacyMapBindings.on.call(this, event, one);\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.listenTo listenTo\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Listen to an event and register the binding for simplified unbinding.\n\t *\n\t * @signature `obj.listenTo([bindTarget,] event, handler)`\n\t *\n\t * `.listenTo` is useful for creating bindings that can can be torn down with\n\t * [can-event-queue/map/map.stopListening]. This is useful when creating\n\t * rich behaviors that can't be accomplished using computed values, or if you are trying to\n\t * avoid streams.\n\t *\n\t * For example, the following creates an observable that counts how many times its\n\t * `name` property has changed:\n\t *\n\t * ```js\n\t * class Person {\n\t * constructor(){\n\t * this.nameChanged = 0;\n\t * this.listenTo(\"name\", function(){\n\t * this.nameChanged++;\n\t * })\n\t * },\n\t * setName(newVal) {\n\t * this.name = newVal;\n\t * this.dispatch(\"name\",[newVal])\n\t * }\n\t * }\n\t * mixinMapBindings(Person.prototype);\n\t *\n\t * var person = new Person();\n\t * person.setName(\"Justin\");\n\t * person.setName(\"Ramiya\");\n\t * person.nameChanged //-> 2\n\t * ```\n\t *\n\t * `.listenTo` event bindings are stored on an observable and MUST be unbound using\n\t * [can-event-queue/map/map.stopListening]. `.stopListening` make it easy to unbind\n\t * all of the `.listenTo` event bindings when the observable is no longer needed:\n\t *\n\t * ```js\n\t * person.stopListening();\n\t * ```\n\t *\n\t * If no `bindTarget` is passed, `.listenTo` binds to the current\n\t * observable.\n\t *\n\t * [can-component]'s `connectedCallback` lifecyle hook is often used to call\n\t * `.listenTo` to setup bindings that update viewmodel properties.\n\t *\n\t *\n\t * @param {Object} [bindTarget] The object to listen for events on. If `bindTarget` is not provided,\n\t * the observable `.listenTo` was called on will be the `bindTarget`.\n\t * @param {String} event The name of the event to listen for.\n\t * @param {Function} handler The handler that will be executed to handle the event.\n\t * @return {Object} this\n\t */\n\tlistenTo: function (bindTarget, event, handler, queueName) {\n\n\t\tif(canReflect_1_19_2_canReflect.isPrimitive(bindTarget)) {\n\t\t\tqueueName = handler;\n\t\t\thandler = event;\n\t\t\tevent = bindTarget;\n\t\t\tbindTarget = this;\n\t\t}\n\n\t\tif(typeof event === \"function\") {\n\t\t\tqueueName = handler;\n\t\t\thandler = event;\n\t\t\tevent = undefined;\n\t\t}\n\n\t\t// Initialize event cache\n\t\tensureMeta(this).listenHandlers.add([bindTarget, event, queueName || \"mutate\", handler]);\n\n\t\tlegacyMapBindings.on.call(bindTarget, event, handler, queueName || \"mutate\");\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.stopListening stopListening\n\t * @parent can-event-queue/map/map\n\t * @description Stops listening for registered event handlers.\n\t *\n\t * @signature `obj.stopListening( [bindTarget], [event,] handler]] )`\n\t *\n\t * `.stopListening` unbinds on event handlers registered through\n\t * [can-event-queue/map/map.listenTo]. All event handlers\n\t * that match the arguments will be unbound. For example:\n\t *\n\t * ```js\n\t * // Unbinds all .listenTo registered handlers\n\t * obj.stopListening()\n\t *\n\t * // Unbinds all .listenTo registered with `bindTarget`\n\t * obj.stopListening(bindTarget)\n\t *\n\t * // Unbinds all .listenTo registered with `bindTarget`, `event`\n\t * obj.stopListening(bindTarget, event)\n\t *\n\t * // Unbinds the handler registered with `bindTarget`, `event`, `handler`\n\t * obj.stopListening(bindTarget, event, handler)\n\t * ```\n\t *\n\t * `.listenTo` is often returned by [can-component]'s `connectedCallback` lifecyle hook.\n\t *\n\t * @param {Object} [bindTarget] The object we will stop listening to event on. If `bindTarget` is\n\t * not provided, the observable `.stopListening` was called on will be the `bindTarget`.\n\t * @param {String} [event] The name of the event to listen for.\n\t * @param {Function} [handler] The handler that will be executed to handle the event.\n\t * @return {Object} this\n\t *\n\t */\n\tstopListening: function () {\n\t\tvar keys = stopListeningArgumentsToKeys.apply({context: this, defaultQueue: \"mutate\"}, arguments);\n\n\t\tvar listenHandlers = ensureMeta(this).listenHandlers;\n\n\t\tfunction deleteHandler(bindTarget, event, queue, handler){\n\t\t\tlegacyMapBindings.off.call(bindTarget, event, handler, queue);\n\t\t}\n\t\tlistenHandlers.delete(keys, deleteHandler);\n\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.on on\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description A shorthand method for listening to event.\n\t *\n\t * @signature `obj.on( event, handler [, queue] )`\n\t *\n\t * Listen to when `obj` dispatches an event, a [can-reflect/observe.onKeyValue]\n\t * change, or a [can-reflect/observe.onValue] change in that order.\n\t *\n\t * As this is the __legacy__ `.on`, it will look for an `.addEventListener`\n\t * method on the `obj` first, before looking for the [can-symbol/symbols/onKeyValue]\n\t * and then [can-symbol/symbols/onValue] symbol.\n\t *\n\t * @param {String} eventName\n\t * @param {Function} handler\n\t * @param {String} [queue]\n\t * @return {Any} The object `on` was called on.\n\t */\n\ton: function(eventName, handler, queue) {\n\t\tvar listenWithDOM = isDomEventTarget$1(this);\n\t\tif (listenWithDOM) {\n\t\t\tif (typeof handler === 'string') {\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.addDelegateListener(this, eventName, handler, queue);\n\t\t\t} else {\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.addEventListener(this, eventName, handler, queue);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this[onEventSymbol]) {\n\t\t\t\tthis[onEventSymbol](eventName, handler, queue);\n\t\t\t} else if (\"addEventListener\" in this) {\n\t\t\t\tthis.addEventListener(eventName, handler, queue);\n\t\t\t} else if (this[onKeyValueSymbol$1]) {\n\t\t\t\tcanReflect_1_19_2_canReflect.onKeyValue(this, eventName, handler, queue);\n\t\t\t} else {\n\t\t\t\tif (!eventName && this[onValueSymbol$1]) {\n\t\t\t\t\tcanReflect_1_19_2_canReflect.onValue(this, handler, queue);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"can-event-queue: Unable to bind \" + eventName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\t/**\n\t * @function can-event-queue/map/map.off off\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description A shorthand method for unbinding an event.\n\t *\n\t * @signature `obj.on( event, handler [, queue] )`\n\t *\n\t * Listen to when `obj` dispatches an event, a [can-reflect/observe.onKeyValue]\n\t * change, or a [can-reflect/observe.onValue] change in that order.\n\t *\n\t * As this is the __legacy__ `.on`, it will look for an `.addEventListener`\n\t * method on the `obj` first, before looking for the [can-symbol/symbols/onKeyValue]\n\t * and then [can-symbol/symbols/onValue] symbol.\n\t *\n\t * @param {String} eventName\n\t * @param {Function} handler\n\t * @param {String} [queue]\n\t * @return {Any} The object `on` was called on.\n\t */\n\toff: function(eventName, handler, queue) {\n\t\tvar listenWithDOM = isDomEventTarget$1(this);\n\t\tif (listenWithDOM) {\n\t\t\tif (typeof handler === 'string') {\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.removeDelegateListener(this, eventName, handler, queue);\n\t\t\t} else {\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.removeEventListener(this, eventName, handler, queue);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this[offEventSymbol]) {\n\t\t\t\tthis[offEventSymbol](eventName, handler, queue);\n\t\t\t} else if (\"removeEventListener\" in this) {\n\t\t\t\tthis.removeEventListener(eventName, handler, queue);\n\t\t\t} else if (this[offKeyValueSymbol]) {\n\t\t\t\tcanReflect_1_19_2_canReflect.offKeyValue(this, eventName, handler, queue);\n\t\t\t} else {\n\t\t\t\tif (!eventName && this[offValueSymbol]) {\n\t\t\t\t\tcanReflect_1_19_2_canReflect.offValue(this, handler, queue);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"can-event-queue: Unable to unbind \" + eventName);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n};\n\n// The symbols we'll add to objects\nvar symbols$1 = {\n\t/**\n\t * @function can-event-queue/map/map.can.onKeyValue @can.onKeyValue\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Register an event handler to be called when a key value changes.\n\t *\n\t * @signature `canReflect.onKeyValue( obj, key, handler(newVal) [,queueName] )`\n\t *\n\t * Add a key change handler to an object. Handlers attached by `.onKeyValue` get\n\t * called back with the new value of the `key`. Handlers attached with [can-event-queue/map/map.can.addEventListener]\n\t * get the event object.\n\t *\n\t * ```js\n\t * var mixinMapBindings = require(\"can-event-queue/map/map\");\n\t *\n\t * var obj = mixinMapBindings({});\n\t *\n\t * canReflect.onKeyValue( obj, \"prop\", function(newPropValue){ ... });\n\t * ```\n\t *\n\t * @param {String} key The name of property to listen to changes in values.\n\t * @param {Function} handler(newVal, oldValue) The handler that will be called\n\t * back with the new and old value of the key.\n\t * @param {String} [queueName='mutate'] The name of the [can-queues] queue the handler will called\n\t * back within. Defaults to `\"mutate\"`.\n\t */\n\t\"can.onKeyValue\": function(key, handler, queueName) {\n\t\tensureMeta(this).handlers.add([key, \"onKeyValue\", queueName || \"mutate\", handler]);\n\t},\n\t/**\n\t * @function can-event-queue/map/map.can.offKeyValue @can.offKeyValue\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Unregister an event handler to be called when an event is dispatched.\n\t *\n\t * @signature `canReflect.offKeyValue( obj, key, handler, queueName )`\n\t *\n\t * Removes a handlers from being called when `key` changes are\n\t * [can-event-queue/map/map.dispatch]ed.\n\t *\n\t * ```js\n\t * // Removes `handler` if it is in the notify queue.\n\t * canReflect.offKeyValue( obj, \"prop\", handler, \"notify\" )\n\t * ```\n\t *\n\t * @param {String} eventName The name of the event to remove. If not specified, all events are removed.\n\t * @param {Function} [handler] The handler that will be removed from the event. If not specified, all handlers for the event are removed.\n\t * @param {String} [queueName='mutate'] The name of the [can-queues] queue the handler was registered on. Defaults to `\"mutate\"`.\n\t */\n\t\"can.offKeyValue\": function(key, handler, queueName) {\n\t\tensureMeta(this).handlers.delete([key, \"onKeyValue\", queueName || \"mutate\", handler]);\n\t},\n\t/**\n\t * @function can-event-queue/map/map.can.isBound @can.isBound\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Return if the observable is bound to.\n\t *\n\t * @signature `canReflect.isBound(obj)`\n\t *\n\t * The `@can.isBound` symbol is added to make [can-reflect/observe.isBound]\n\t * return if `obj` is bound or not.\n\t *\n\t * @return {Boolean} True if the observable has been bound to with `.onKeyValue` or `.addEventListener`.\n\t */\n\t\"can.isBound\": function() {\n\t\treturn !ensureMeta(this).handlers.isEmpty();\n\t},\n\t/**\n\t * @function can-event-queue/map/map.can.getWhatIChange @can.getWhatIChange\n\t * @parent can-event-queue/map/map\n\t *\n\t * @description Return observables whose values are affected by attached event handlers\n\t * @signature `@can.getWhatIChange(key)`\n\t *\n\t * The `@@can.getWhatIChange` symbol is added to make sure [can-debug] can report\n\t * all the observables whose values are set by a given observable's key.\n\t *\n\t * This function iterates over the event handlers attached to a given `key` and\n\t * collects the result of calling `@@can.getChangesDependencyRecord` on each handler;\n\t * this symbol allows the caller to tell what observables are being mutated by\n\t * the event handler when it is executed.\n\t *\n\t * In the following example a [can-simple-map] instance named `me` is created\n\t * and when its `age` property changes, the value of a [can-simple-observable]\n\t * instance is set. The event handler that causes the mutation is then decatorated\n\t * with `@@can.getChangesDependencyRecord` to register the mutation dependency.\n\t *\n\t * ```js\n\t * var obs = new SimpleObservable(\"a\");\n\t * var me = new SimpleMap({ age: 30 });\n\t * var canReflect = require(\"can-reflect\");\n\t *\n\t * var onAgeChange = function onAgeChange() {\n\t *\tcanReflect.setValue(obs, \"b\");\n\t * };\n\t *\n\t * onAgeChange[canSymbol.for(\"can.getChangesDependencyRecord\")] = function() {\n\t *\treturn {\n\t *\t\tvalueDependencies: new Set([ obs ]);\n\t *\t}\n\t * };\n\t *\n\t * canReflect.onKeyValue(me, \"age\", onAgeChange);\n\t * me[canSymbol.for(\"can.getWhatIChange\")](\"age\");\n\t * ```\n\t *\n\t * The dependency records collected from the event handlers are divided into\n\t * two categories:\n\t *\n\t * - mutate: Handlers in the mutate/domUI queues\n\t * - derive: Handlers in the notify queue\n\t *\n\t * Since event handlers are added by default to the \"mutate\" queue, calling\n\t * `@@can.getWhatIChange` on the `me` instance returns an object with a mutate\n\t * property and the `valueDependencies` Set registered on the `onAgeChange`\n\t * handler.\n\t *\n\t * Please check out the [can-reflect-dependencies] docs to learn more about\n\t * how this symbol is used to keep track of custom observable dependencies.\n\t */\n\t\"can.getWhatIChange\": function getWhatIChange(key) {\n\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tvar whatIChange = {};\n\t\t\tvar meta = ensureMeta(this);\n\n\t\t\tvar notifyHandlers = [].concat(\n\t\t\t\tmeta.handlers.get([key, \"event\", \"notify\"]),\n\t\t\t\tmeta.handlers.get([key, \"onKeyValue\", \"notify\"])\n\t\t\t);\n\n\t\t\tvar mutateHandlers = [].concat(\n\t\t\t\tmeta.handlers.get([key, \"event\", \"mutate\"]),\n\t\t\t\tmeta.handlers.get([key, \"event\", \"domUI\"]),\n\t\t\t\tmeta.handlers.get([key, \"onKeyValue\", \"mutate\"]),\n\t\t\t\tmeta.handlers.get([key, \"onKeyValue\", \"domUI\"])\n\t\t\t);\n\n\t\t\tif (notifyHandlers.length) {\n\t\t\t\tnotifyHandlers.forEach(function(handler) {\n\t\t\t\t\tvar changes = canReflect_1_19_2_canReflect.getChangesDependencyRecord(handler);\n\n\t\t\t\t\tif (changes) {\n\t\t\t\t\t\tvar record = whatIChange.derive;\n\t\t\t\t\t\tif (!record) {\n\t\t\t\t\t\t\trecord = (whatIChange.derive = {});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmerge(record, changes);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (mutateHandlers.length) {\n\t\t\t\tmutateHandlers.forEach(function(handler) {\n\t\t\t\t\tvar changes = canReflect_1_19_2_canReflect.getChangesDependencyRecord(handler);\n\n\t\t\t\t\tif (changes) {\n\t\t\t\t\t\tvar record = whatIChange.mutate;\n\t\t\t\t\t\tif (!record) {\n\t\t\t\t\t\t\trecord = (whatIChange.mutate = {});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmerge(record, changes);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn Object.keys(whatIChange).length ? whatIChange : undefined;\n\t\t}\n\t\t//!steal-remove-end\n\t},\n\t\"can.onPatches\": function(handler, queue) {\n\t\tvar handlers = ensureMeta(this).handlers;\n\t\thandlers.add([\"can.patches\", \"onKeyValue\", queue || \"notify\", handler]);\n\t},\n\t\"can.offPatches\": function(handler, queue) {\n\t\tvar handlers = ensureMeta(this).handlers;\n\t\thandlers.delete([\"can.patches\", \"onKeyValue\", queue || \"notify\", handler]);\n\t}\n};\n\n// This can be removed in a future version.\nfunction defineNonEnumerable$1(obj, prop, value) {\n\tObject.defineProperty(obj, prop, {\n\t\tenumerable: false,\n\t\tvalue: value\n\t});\n}\n\n// The actual legacyMapBindings mixin function\nlegacyMapBindings = function(obj) {\n\t// add properties\n\tcanReflect_1_19_2_canReflect.assignMap(obj, props);\n\t// add symbols\n\treturn canReflect_1_19_2_canReflect.assignSymbols(obj, symbols$1);\n};\n\ndefineNonEnumerable$1(legacyMapBindings, \"addHandlers\", addHandlers);\ndefineNonEnumerable$1(legacyMapBindings, \"stopListeningArgumentsToKeys\", stopListeningArgumentsToKeys);\n\n\n\n// ## LEGACY\n// The following is for compatability with the old can-event\nprops.bind = props.addEventListener;\nprops.unbind = props.removeEventListener;\n\n\n\n// Adds methods directly to method so it can be used like `can-event` used to be used.\ncanReflect_1_19_2_canReflect.assignMap(legacyMapBindings, props);\ncanReflect_1_19_2_canReflect.assignSymbols(legacyMapBindings, symbols$1);\n\ndefineNonEnumerable$1(legacyMapBindings, \"start\", function() {\n\tconsole.warn(\"use can-queues.batch.start()\");\n\tcanQueues_1_3_2_canQueues.batch.start();\n});\ndefineNonEnumerable$1(legacyMapBindings, \"stop\", function() {\n\tconsole.warn(\"use can-queues.batch.stop()\");\n\tcanQueues_1_3_2_canQueues.batch.stop();\n});\ndefineNonEnumerable$1(legacyMapBindings, \"flush\", function() {\n\tconsole.warn(\"use can-queues.flush()\");\n\tcanQueues_1_3_2_canQueues.flush();\n});\n\ndefineNonEnumerable$1(legacyMapBindings, \"afterPreviousEvents\", function(handler) {\n\tconsole.warn(\"don't use afterPreviousEvents\");\n\tcanQueues_1_3_2_canQueues.mutateQueue.enqueue(function afterPreviousEvents() {\n\t\tcanQueues_1_3_2_canQueues.mutateQueue.enqueue(handler);\n\t});\n\tcanQueues_1_3_2_canQueues.flush();\n});\n\ndefineNonEnumerable$1(legacyMapBindings, \"after\", function(handler) {\n\tconsole.warn(\"don't use after\");\n\tcanQueues_1_3_2_canQueues.mutateQueue.enqueue(handler);\n\tcanQueues_1_3_2_canQueues.flush();\n});\n\nvar map$1 = legacyMapBindings;\n\n// Ensure the \"obj\" passed as an argument has an object on @@can.meta\nvar ensureMeta$1 = function ensureMeta(obj) {\n\tvar metaSymbol = canSymbol_1_7_0_canSymbol.for(\"can.meta\");\n\tvar meta = obj[metaSymbol];\n\n\tif (!meta) {\n\t\tmeta = {};\n\t\tcanReflect_1_19_2_canReflect.setKeyValue(obj, metaSymbol, meta);\n\t}\n\n\treturn meta;\n};\n\n// this is a very simple can-map like object\nvar SimpleMap = canConstruct_3_5_7_canConstruct.extend(\"SimpleMap\",\n\t{\n\t\t// ### setup\n\t\t// A setup function for the instantiation of a simple-map.\n\t\tsetup: function(initialData){\n\t\t\tthis._data = {};\n\t\t\tif(initialData && typeof initialData === \"object\") {\n\t\t\t\tthis.attr(initialData);\n\t\t\t}\n\t\t},\n\t\t// ### attr\n\t\t// The main get/set interface simple-map.\n\t\t// Either sets or gets one or more properties depending on how it is called.\n\t\tattr: function(prop, value) {\n\t\t\tvar self = this;\n\n\t\t\tif(arguments.length === 0 ) {\n\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this,\"can.keys\");\n\t\t\t\tvar data = {};\n\t\t\t\tcanReflect_1_19_2_canReflect.eachKey(this._data, function(value, prop){\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, prop);\n\t\t\t\t\tdata[prop] = value;\n\t\t\t\t}, this);\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\telse if(arguments.length > 1) {\n\t\t\t\tvar had = this._data.hasOwnProperty(prop);\n\t\t\t\tvar old = this._data[prop];\n\t\t\t\tthis._data[prop] = value;\n\t\t\t\tif(old !== value) {\n\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tif (typeof this._log === \"function\") {\n\t\t\t\t\t\t\tthis._log(prop, value, old);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\tvar dispatched = {\n\t\t\t\t\t\tkeyChanged: !had ? prop : undefined,\n\t\t\t\t\t\ttype: prop\n\t\t\t\t\t};\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tdispatched = {\n\t\t\t\t\t\t\tkeyChanged: !had ? prop : undefined,\n\t\t\t\t\t\t\ttype: prop,\n\t\t\t\t\t\t\treasonLog: [ canReflect_1_19_2_canReflect.getName(this) + \"'s\", prop, \"changed to\", value, \"from\", old ],\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\tthis.dispatch(dispatched, [value, old]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// 1 argument\n\t\t\telse if(typeof prop === 'object') {\n\t\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\t\tcanReflect_1_19_2_canReflect.eachKey(prop, function(value, key) {\n\t\t\t\t\tself.attr(key, value);\n\t\t\t\t});\n\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(prop !== \"constructor\") {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, prop);\n\t\t\t\t\treturn this._data[prop];\n\t\t\t\t}\n\n\t\t\t\treturn this.constructor;\n\t\t\t}\n\t\t},\n\t\tserialize: function(){\n\t\t\treturn canReflect_1_19_2_canReflect.serialize(this, Map);\n\t\t},\n\t\tget: function(){\n\t\t\treturn this.attr.apply(this, arguments);\n\t\t},\n\t\tset: function(){\n\t\t\treturn this.attr.apply(this, arguments);\n\t\t},\n\t\t// call `.log()` to log all property changes\n\t\t// pass a single property to only get logs for said property, e.g: `.log(\"foo\")`\n\t\tlog: function(key) {\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tvar quoteString = function quoteString(x) {\n\t\t\t\t\treturn typeof x === \"string\" ? JSON.stringify(x) : x;\n\t\t\t\t};\n\t\t\t\tvar meta = ensureMeta$1(this);\n\t\t\t\tmeta.allowedLogKeysSet = meta.allowedLogKeysSet || new Set();\n\n\t\t\t\tif (key) {\n\t\t\t\t\tmeta.allowedLogKeysSet.add(key);\n\t\t\t\t}\n\n\t\t\t\tthis._log = function(prop, current, previous, log) {\n\t\t\t\t\tif (key && !meta.allowedLogKeysSet.has(prop)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tdev.log(\n\t\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(this),\n\t\t\t\t\t\t\"\\n key \", quoteString(prop),\n\t\t\t\t\t\t\"\\n is \", quoteString(current),\n\t\t\t\t\t\t\"\\n was \", quoteString(previous)\n\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t}\n\t}\n);\n\nmap$1(SimpleMap.prototype);\n\nvar simpleMapProto = {\n\t// -type-\n\t\"can.isMapLike\": true,\n\t\"can.isListLike\": false,\n\t\"can.isValueLike\": false,\n\n\t// -get/set-\n\t\"can.getKeyValue\": SimpleMap.prototype.get,\n\t\"can.setKeyValue\": SimpleMap.prototype.set,\n\t\"can.deleteKeyValue\": function(prop) {\n\t\tvar dispatched;\n\t\tif( this._data.hasOwnProperty(prop) ) {\n\t\t\tvar old = this._data[prop];\n\t\t\tdelete this._data[prop];\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tif (typeof this._log === \"function\") {\n\t\t\t\t\tthis._log(prop, undefined, old);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\tdispatched = {\n\t\t\t\tkeyChanged: prop,\n\t\t\t\ttype: prop\n\t\t\t};\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tdispatched = {\n\t\t\t\t\tkeyChanged: prop,\n\t\t\t\t\ttype: prop,\n\t\t\t\t\treasonLog: [ canReflect_1_19_2_canReflect.getName(this) + \"'s\", prop, \"deleted\", old ]\n\t\t\t\t};\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\tthis.dispatch(dispatched, [undefined, old]);\n\t\t}\n\t},\n\n\n\t// -shape\n\t\"can.getOwnEnumerableKeys\": function(){\n\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, 'can.keys');\n\t\treturn Object.keys(this._data);\n\t},\n\n\t// -shape get/set-\n\t\"can.assignDeep\": function(source){\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t// TODO: we should probably just throw an error instead of cleaning\n\t\tcanReflect_1_19_2_canReflect.assignMap(this, source);\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t},\n\t\"can.updateDeep\": function(source){\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t// TODO: we should probably just throw an error instead of cleaning\n\t\tcanReflect_1_19_2_canReflect.updateMap(this, source);\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t},\n\t\"can.keyHasDependencies\": function(key) {\n\t\treturn false;\n\t},\n\t\"can.getKeyDependencies\": function(key) {\n\t\treturn undefined;\n\t},\n\t\"can.hasOwnKey\": function(key){\n\t\treturn this._data.hasOwnProperty(key);\n\t}\n};\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tsimpleMapProto[\"can.getName\"] = function() {\n\t\treturn canReflect_1_19_2_canReflect.getName(this.constructor) + \"{}\";\n\t};\n}\n//!steal-remove-end\ncanReflect_1_19_2_canReflect.assignSymbols(SimpleMap.prototype,simpleMapProto);\n\n// Setup other symbols\n\n\nvar canSimpleMap_4_3_3_canSimpleMap = SimpleMap;\n\n/**\n * Creates a constructor function from an ES2015 class, this is a workaround\n * needed to being able to extend a class from code that's transpiled by Babel.\n * See https://github.com/babel/babel/pull/8656\n * @param {*} Type The ES2015 base class used to create the constructor\n * @param {*} Parent The object where the prototype chain walk to copy over\n * symbols and static properties to the constructor stops. If not provided,\n * the chain stops at Object.\n * @returns {Function} Constructor function than can be safely subclassed from\n * transpiled code.\n */\nfunction createConstructorFunction(Type, Parent) {\n\tif (typeof Parent === \"undefined\") {\n\t\tParent = Object.getPrototypeOf(Object);\n\t}\n\n\tfunction TypeConstructor() {\n\t\treturn Reflect.construct(Type, arguments, this.constructor);\n\t}\n\n\tTypeConstructor.prototype = Object.create(Type.prototype);\n\tTypeConstructor.prototype.constructor = TypeConstructor;\n\n\t/**\n\t * Add `prop` to TypeConstructor from `source` if not defined already\n\t * @param {{}} source The object that owns `prop`\n\t * @param {string} prop The name of the property to be defined\n\t */\n\tfunction copyIfMissing(source, prop) {\n\t\tif (!TypeConstructor[prop]) {\n\t\t\tObject.defineProperty(\n\t\t\t\tTypeConstructor,\n\t\t\t\tprop,\n\t\t\t\tObject.getOwnPropertyDescriptor(source, prop)\n\t\t\t);\n\t\t}\n\t}\n\n\t// Walk up the prototype chain to copy over all Symbols and\n\t// static properties to the constructor function\n\tlet Link = Type;\n\twhile (Link !== Parent && Link !== null) {\n\t\tconst props = Object.getOwnPropertyNames(Link);\n\t\tprops.forEach(function(prop) {\n\t\t\tcopyIfMissing(Link, prop);\n\t\t});\n\n\t\tconst symbols = Object.getOwnPropertySymbols(Link);\n\t\tsymbols.forEach(function(symbol) {\n\t\t\tcopyIfMissing(Link, symbol);\n\t\t});\n\n\t\tLink = Object.getPrototypeOf(Link);\n\t}\n\n\treturn TypeConstructor;\n}\n\nvar createConstructorFunction_1 = createConstructorFunction;\n\n// This is an observable that is like `settable`, but passed a `resolve`\n// function that can resolve the value of this observable late.\nfunction AsyncObservable(fn, context, initialValue) {\n\tthis.resolve = this.resolve.bind(this);\n\tthis.lastSetValue = new canSimpleObservable_2_5_0_canSimpleObservable(initialValue);\n\tthis.handler = this.handler.bind(this);\n\n\tfunction observe() {\n\t\tthis.resolveCalled = false;\n\n\t\t// set inGetter flag to avoid calling `resolve` redundantly if it is called\n\t\t// synchronously in the getter\n\t\tthis.inGetter = true;\n\t\tvar newVal = fn.call(\n\t\t\tcontext,\n\t\t\tthis.lastSetValue.get(),\n\t\t\tthis.bound === true ? this.resolve : undefined\n\t\t);\n\t\tthis.inGetter = false;\n\n\t\t// if the getter returned a value, resolve with the value\n\t\tif (newVal !== undefined) {\n\t\t\tthis.resolve(newVal);\n\t\t}\n\t\t// otherwise, if `resolve` was called synchronously in the getter,\n\t\t// resolve with the value passed to `resolve`\n\t\telse if (this.resolveCalled) {\n\t\t\tthis.resolve(this._value);\n\t\t}\n\n\t\t// if bound, the handlers will be called by `resolve`\n\t\t// returning here would cause a duplicate event\n\t\tif (this.bound !== true) {\n\t\t\treturn newVal;\n\t\t}\n\t}\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(this, {\n\t\t\t\"can.getName\": function() {\n\t\t\t\treturn (\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(this.constructor) +\n\t\t\t\t\t\"<\" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(fn) +\n\t\t\t\t\t\">\"\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(this.handler, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this) + \".handler\"\n\t\t});\n\t\tObject.defineProperty(observe, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(fn) + \"::\" + canReflect_1_19_2_canReflect.getName(this.constructor)\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tthis.observation = new canObservation_4_2_0_canObservation(observe, this);\n}\nAsyncObservable.prototype = Object.create(settable.prototype);\nAsyncObservable.prototype.constructor = AsyncObservable;\n\nAsyncObservable.prototype.handler = function(newVal) {\n\tif (newVal !== undefined) {\n\t\tsettable.prototype.handler.apply(this, arguments);\n\t}\n};\n\nvar peek$1 = canObservationRecorder_1_3_1_canObservationRecorder.ignore(canReflect_1_19_2_canReflect.getValue.bind(canReflect_1_19_2_canReflect));\nAsyncObservable.prototype.activate = function() {\n\tcanReflect_1_19_2_canReflect.onValue(this.observation, this.handler, \"notify\");\n\tif (!this.resolveCalled) {\n\t\tthis._value = peek$1(this.observation);\n\t}\n};\n\nAsyncObservable.prototype.resolve = function resolve(newVal) {\n\tthis.resolveCalled = true;\n\tvar old = this._value;\n\tthis._value = newVal;\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tif (typeof this._log === \"function\") {\n\t\t\tthis._log(old, newVal);\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\t// if resolve was called synchronously from the getter, do not enqueue changes\n\t// the observation will handle calling resolve again if required\n\tif (!this.inGetter) {\n\t\tvar queuesArgs = [\n\t\tthis.handlers.getNode([]),\n\t\t\tthis,\n\t\t\t[newVal, old],\n\t\t\tnull\n\t\t];\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tqueuesArgs = [\n\t\t\t\tthis.handlers.getNode([]),\n\t\t\t\tthis,\n\t\t\t\t[newVal, old],\n\t\t\t\tnull\n\t\t\t\t/* jshint laxcomma: true */\n\t\t\t\t, [canReflect_1_19_2_canReflect.getName(this), \"resolved with\", newVal]\n\t\t\t\t/* jshint laxcomma: false */\n\t\t\t];\n\t\t}\n\t\t//!steal-remove-end\n\t\t// adds callback handlers to be called w/i their respective queue.\n\t\tcanQueues_1_3_2_canQueues.enqueueByQueue.apply(canQueues_1_3_2_canQueues, queuesArgs);\n\t}\n};\n\nvar async = AsyncObservable;\n\nvar getChangesSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.getChangesDependencyRecord\");\nvar metaSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.meta\");\n\nfunction ResolverObservable(resolver, context, initialValue, options) {\n\t// we don't want reads leaking out. We should be binding to all of this ourselves.\n\tthis.resolver = canObservationRecorder_1_3_1_canObservationRecorder.ignore(resolver);\n\tthis.context = context;\n\tthis._valueOptions = {\n\t\tresolve: this.resolve.bind(this),\n\t\tlistenTo: this.listenTo.bind(this),\n\t\tstopListening: this.stopListening.bind(this),\n\t\tlastSet: new canSimpleObservable_2_5_0_canSimpleObservable(initialValue)\n\t};\n\n\tthis.update = this.update.bind(this);\n\n\tthis.contextHandlers = new WeakMap();\n\tthis.teardown = null;\n\t// a place holder for remembering where we bind\n\tthis.binder = {};\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(this, {\n\t\t\t\"can.getName\": function() {\n\t\t\t\treturn (\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(this.constructor) +\n\t\t\t\t\t\"<\" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(resolver) +\n\t\t\t\t\t\">\"\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(this.update, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this) + \".update\"\n\t\t});\n\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(this._valueOptions.lastSet, {\n\t\t\t\"can.getName\": function() {\n\t\t\t\treturn (\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(this.constructor) +\"::lastSet\"+\n\t\t\t\t\t\"<\" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(resolver) +\n\t\t\t\t\t\">\"\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tthis[metaSymbol$1] = canReflect_1_19_2_canReflect.assignMap({}, options);\n}\nResolverObservable.prototype = Object.create(settable.prototype);\n\nfunction deleteHandler(bindTarget, event, queue, handler){\n\tmap$1.off.call(bindTarget, event, handler, queue);\n}\n\ncanReflect_1_19_2_canReflect.assignMap(ResolverObservable.prototype, {\n\tconstructor: ResolverObservable,\n\tlistenTo: function(bindTarget, event, handler, queueName) {\n\t\t//Object.defineProperty(this.handler, \"name\", {\n\t\t//\tvalue: canReflect.getName(this) + \".handler\"\n\t\t//});\n\t\tif(canReflect_1_19_2_canReflect.isPrimitive(bindTarget)) {\n\t\t\thandler = event;\n\t\t\tevent = bindTarget;\n\t\t\tbindTarget = this.context;\n\t\t}\n\t\tif(typeof event === \"function\") {\n\t\t\thandler = event;\n\t\t\tevent = undefined;\n\t\t}\n\n\t\tvar resolverInstance = this;\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif(!handler.name) {\n\t\t\t\tObject.defineProperty(handler, \"name\", {\n\t\t\t\t\tvalue:\n\t\t\t\t\t\t(bindTarget ?\n\t\t\t\t\t\t\t canReflect_1_19_2_canReflect.getName(bindTarget) : \"\")+\n\t\t\t\t\t\t (event ? \".on('\"+event+\"',handler)\" : \".on(handler)\")+\n\t\t\t\t\t\t \"::\"+canReflect_1_19_2_canReflect.getName(this)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\tvar contextHandler = handler.bind(this.context);\n\t\tcontextHandler[getChangesSymbol$1] = function getChangesDependencyRecord() {\n\t\t\tvar s = new Set();\n\t\t\ts.add(resolverInstance);\n\t\t\treturn {\n\t\t\t\tvalueDependencies: s\n\t\t\t};\n\t\t};\n\n\t\tthis.contextHandlers.set(handler, contextHandler);\n\t\tmap$1.listenTo.call(this.binder, bindTarget, event, contextHandler, queueName || \"notify\");\n\t},\n\tstopListening: function(){\n\n\t\tvar meta = this.binder[canSymbol_1_7_0_canSymbol.for(\"can.meta\")];\n\t\tvar listenHandlers = meta && meta.listenHandlers;\n\t\tif(listenHandlers) {\n\t\t\tvar keys = map$1.stopListeningArgumentsToKeys.call({context: this.context, defaultQueue: \"notify\"});\n\n\t\t\tlistenHandlers.delete(keys, deleteHandler);\n\t\t}\n\t\treturn this;\n\t},\n\tresolve: function(newVal) {\n\t\tthis._value = newVal;\n\t\t// if we are setting up the initial binding and we get a resolved value\n\t\t// do not emit events for it.\n\n\t\tif(this.isBinding) {\n\t\t\tthis.lastValue = this._value;\n\t\t\treturn newVal;\n\t\t}\n\n\t\tif(this._value !== this.lastValue) {\n\t\t\tvar enqueueMeta = {};\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t/* jshint laxcomma: true */\n\t\t\t\tenqueueMeta = {\n\t\t\t\t\tlog: [canReflect_1_19_2_canReflect.getName(this.update)],\n\t\t\t\t\treasonLog: [canReflect_1_19_2_canReflect.getName(this), \"resolved with\", newVal]\n\t\t\t\t};\n\t\t\t\t/* jshint laxcomma: false */\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\tcanQueues_1_3_2_canQueues.deriveQueue.enqueue(\n\t\t\t\tthis.update,\n\t\t\t\tthis,\n\t\t\t\t[],\n\t\t\t\tenqueueMeta\n\t\t\t);\n\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t}\n\t\treturn newVal;\n\t},\n\tupdate: function(){\n\n\t\tif(this.lastValue !== this._value) {\n\n\t\t\tvar old = this.lastValue;\n\t\t\tthis.lastValue = this._value;\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tif (typeof this._log === \"function\") {\n\t\t\t\t\tthis._log(old, this._value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\t// adds callback handlers to be called w/i their respective queue.\n\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(\n\t\t\t\tthis.handlers.getNode([]),\n\t\t\t\tthis,\n\t\t\t\t[this._value, old]\n\t\t\t);\n\t\t}\n\t},\n\tactivate: function() {\n\t\tthis.isBinding = true;\n\t\tthis.teardown = this.resolver.call(this.context, this._valueOptions);\n\t\tthis.isBinding = false;\n\t},\n\tonUnbound: function() {\n\t\tthis.bound = false;\n\t\tmap$1.stopListening.call(this.binder);\n\t\tif(this.teardown != null) {\n\t\t\tthis.teardown();\n\t\t\tthis.teardown = null;\n\t\t}\n\t},\n\tset: function(value) {\n\t\tthis._valueOptions.lastSet.set(value);\n\n\t\t/*if (newVal !== this.lastSetValue.get()) {\n\t\t\tthis.lastSetValue.set(newVal);\n\t\t}*/\n\t},\n\tget: function() {\n\t\tif (canObservationRecorder_1_3_1_canObservationRecorder.isRecording()) {\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this);\n\t\t\tif (!this.bound) {\n\t\t\t\tthis.onBound();\n\t\t\t}\n\t\t}\n\n\t\tif (this.bound === true) {\n\t\t\treturn this._value;\n\t\t} else {\n\t\t\tif (this[metaSymbol$1].resetUnboundValueInGet) {\n\t\t\t\tthis._value = undefined;\n\t\t\t}\n\n\t\t\tvar handler = function(){};\n\t\t\tthis.on(handler);\n\t\t\tvar val = this._value;\n\t\t\tthis.off(handler);\n\t\t\treturn val;\n\t\t}\n\t},\n\thasDependencies: function hasDependencies() {\n\t\tvar hasDependencies = false;\n\n\t\tif (this.bound) {\n\t\t\tvar meta = this.binder[metaSymbol$1];\n\t\t\tvar listenHandlers = meta && meta.listenHandlers;\n\t\t\thasDependencies = !!listenHandlers.size();\n\t\t}\n\n\t\treturn hasDependencies;\n\t},\n\tgetValueDependencies: function getValueDependencies() {\n\t\tif (this.bound) {\n\t\t\tvar meta = this.binder[canSymbol_1_7_0_canSymbol.for(\"can.meta\")];\n\t\t\tvar listenHandlers = meta && meta.listenHandlers;\n\n\t\t\tvar keyDeps = new Map();\n\t\t\tvar valueDeps = new Set();\n\n\t\t\tif (listenHandlers) {\n\t\t\t\tcanReflect_1_19_2_canReflect.each(listenHandlers.root, function(events, obj) {\n\t\t\t\t\tcanReflect_1_19_2_canReflect.each(events, function(queues, eventName) {\n\t\t\t\t\t\tif (eventName === undefined) {\n\t\t\t\t\t\t\tvalueDeps.add(obj);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar entry = keyDeps.get(obj);\n\t\t\t\t\t\t\tif (!entry) {\n\t\t\t\t\t\t\t\tentry = new Set();\n\t\t\t\t\t\t\t\tkeyDeps.set(obj, entry);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tentry.add(eventName);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tif (valueDeps.size || keyDeps.size) {\n\t\t\t\t\tvar result = {};\n\n\t\t\t\t\tif (keyDeps.size) {\n\t\t\t\t\t\tresult.keyDependencies = keyDeps;\n\t\t\t\t\t}\n\t\t\t\t\tif (valueDeps.size) {\n\t\t\t\t\t\tresult.valueDependencies = valueDeps;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n});\n\ncanReflect_1_19_2_canReflect.assignSymbols(ResolverObservable.prototype, {\n\t\"can.getValue\": ResolverObservable.prototype.get,\n\t\"can.setValue\": ResolverObservable.prototype.set,\n\t\"can.isMapLike\": false,\n\t\"can.getPriority\": function() {\n\t\t// TODO: the priority should come from any underlying values\n\t\treturn this.priority || 0;\n\t},\n\t\"can.setPriority\": function(newPriority) {\n\t\tthis.priority = newPriority;\n\t},\n\t\"can.valueHasDependencies\": ResolverObservable.prototype.hasDependencies,\n\t\"can.getValueDependencies\": ResolverObservable.prototype.getValueDependencies\n});\n\n\nvar resolver = ResolverObservable;\n\n/**\n * @module {function} can-event-queue/type/type\n * @parent can-event-queue\n *\n * @description Mixin methods and symbols to make a type constructor function able to\n * broadcast changes in its instances.\n *\n * @signature `mixinTypeBindings( type )`\n *\n * Adds symbols and methods that make `type` work with the following [can-reflect] APIs:\n *\n * - [can-reflect/observe.onInstanceBoundChange] - Observe when instances are bound.\n * - [can-reflect/observe.onInstancePatches] - Observe patche events on all instances.\n *\n * When `mixinTypeBindings` is called on an `Person` _type_ like:\n *\n * ```js\n * var mixinTypeBindings = require(\"can-event-queue/type/type\");\n * var mixinLegacyMapBindings = require(\"can-event-queue/map/map\");\n *\n * class Person {\n * constructor(data){\n * this.data = data;\n * }\n * }\n * mixinTypeBindings(Person);\n * mixinLegacyMapBindings(Person.prototype);\n *\n * var me = new Person({first: \"Justin\", last: \"Meyer\"});\n *\n * // mixinTypeBindings allows you to listen to\n * // when a person instance's bind stache changes\n * canReflect.onInstanceBoundChange(Person, function(person, isBound){\n * console.log(\"isBound\");\n * });\n *\n * // mixinTypeBindings allows you to listen to\n * // when a patch change happens.\n * canReflect.onInstancePatches(Person, function(person, patches){\n * console.log(patches[0]);\n * });\n *\n * me.on(\"name\",function(ev, newVal, oldVal){}) //-> logs: \"isBound\"\n *\n * me.dispatch({\n * type: \"first\",\n * patches: [{type: \"set\", key: \"first\", value: \"Ramiya\"}]\n * }, [\"Ramiya\",\"Justin\"])\n * //-> logs: {type: \"set\", key: \"first\", value: \"Ramiya\"}\n * ```\n *\n */\n\n\n\n\n\nvar metaSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.meta\");\n\nfunction addHandlers$1(obj, meta) {\n if (!meta.lifecycleHandlers) {\n meta.lifecycleHandlers = new canKeyTree_1_2_2_canKeyTree([Object, Array]);\n }\n if (!meta.instancePatchesHandlers) {\n meta.instancePatchesHandlers = new canKeyTree_1_2_2_canKeyTree([Object, Array]);\n }\n}\n\nfunction ensureMeta$2(obj) {\n var meta = obj[metaSymbol$2];\n\n if (!meta) {\n meta = {};\n canReflect_1_19_2_canReflect.setKeyValue(obj, metaSymbol$2, meta);\n }\n\n addHandlers$1(obj, meta);\n return meta;\n}\n\nvar props$1 = {\n /**\n * @function can-event-queue/type/type.can.onInstanceBoundChange @can.onInstanceBoundChange\n * @parent can-event-queue/type/type\n * @description Listen to when any instance is bound for the first time or all handlers are removed.\n *\n * @signature `canReflect.onInstanceBoundChange(Type, handler(instance, isBound) )`\n *\n * ```js\n * canReflect.onInstanceBoundChange(Person, function(person, isBound){\n * console.log(\"isBound\");\n * });\n * ```\n *\n * @param {function(Any,Boolean)} handler(instance,isBound) A function is called\n * when an instance is bound or unbound. `isBound` will be `true` when the instance\n * becomes bound and `false` when unbound.\n */\n\n /**\n * @function can-event-queue/type/type.can.offInstanceBoundChange @can.offInstanceBoundChange\n * @parent can-event-queue/type/type\n *\n * @description Stop listening to when an instance's bound status changes.\n *\n * @signature `canReflect.offInstanceBoundChange(Type, handler )`\n *\n * Stop listening to a handler bound with\n * [can-event-queue/type/type.can.onInstanceBoundChange].\n */\n\n\n /**\n * @function can-event-queue/type/type.can.onInstancePatches @can.onInstancePatches\n * @parent can-event-queue/type/type\n *\n * @description Listen to patch changes on any instance.\n *\n * @signature `canReflect.onInstancePatches(Type, handler(instance, patches) )`\n *\n * Listen to patch changes on any instance of `Type`. This is used by\n * [can-connect] to know when a potentially `unbound` instance's `id`\n * changes. If the `id` changes, the instance can be moved into the store\n * while it is being saved.\n *\n */\n\n /**\n * @function can-event-queue/type/type.can.offInstancePatches @can.offInstancePatches\n * @parent can-event-queue/type/type\n *\n * @description Stop listening to patch changes on any instance.\n *\n * @signature `canReflect.onInstancePatches(Type, handler )`\n *\n * Stop listening to a handler bound with [can-event-queue/type/type.can.onInstancePatches].\n */\n};\n\nfunction onOffAndDispatch(symbolName, dispatchName, handlersName){\n props$1[\"can.on\"+symbolName] = function(handler, queueName) {\n ensureMeta$2(this)[handlersName].add([queueName || \"mutate\", handler]);\n };\n props$1[\"can.off\"+symbolName] = function(handler, queueName) {\n ensureMeta$2(this)[handlersName].delete([queueName || \"mutate\", handler]);\n };\n props$1[\"can.\"+dispatchName] = function(instance, arg){\n canQueues_1_3_2_canQueues.enqueueByQueue(ensureMeta$2(this)[handlersName].getNode([]), this, [instance, arg]);\n };\n}\n\nonOffAndDispatch(\"InstancePatches\",\"dispatchInstanceOnPatches\",\"instancePatchesHandlers\");\nonOffAndDispatch(\"InstanceBoundChange\",\"dispatchInstanceBoundChange\",\"lifecycleHandlers\");\n\nfunction mixinTypeBindings(obj){\n return canReflect_1_19_2_canReflect.assignSymbols(obj,props$1);\n}\n\nObject.defineProperty(mixinTypeBindings, \"addHandlers\", {\n enumerable: false,\n value: addHandlers$1\n});\n\nvar type$1 = mixinTypeBindings;\n\nvar canType_1_1_6_canType = createCommonjsModule(function (module, exports) {\nvar isMemberSymbol = canSymbol_1_7_0_canSymbol.for(\"can.isMember\");\nvar newSymbol = canSymbol_1_7_0_canSymbol.for(\"can.new\");\nvar getSchemaSymbol = canSymbol_1_7_0_canSymbol.for(\"can.getSchema\");\nvar baseTypeSymbol = canSymbol_1_7_0_canSymbol.for(\"can.baseType\");\nvar strictTypeOfSymbol = canSymbol_1_7_0_canSymbol.for(\"can.strictTypeOf\");\n\nvar type = exports;\n\nfunction makeSchema(values) {\n\treturn function(){\n\t\treturn {\n\t\t\ttype: \"Or\",\n\t\t\tvalues: values\n\t\t};\n\t};\n}\n\n// Default \"can.new\"\nfunction canNew(value) {\n\tif(this[isMemberSymbol](value)) {\n\t\treturn value;\n\t}\n\n\treturn canReflect_1_19_2_canReflect.convert(value, this[baseTypeSymbol]);\n}\n\nfunction strictNew(value) {\n\tvar isMember = this[isMemberSymbol](value);\n\tif(!isMember) {\n\t\treturn check(this[baseTypeSymbol], value);\n\t}\n\treturn value;\n}\n\n// \"can.new\" for Booleans\nfunction booleanNew(value) {\n\tif (value === \"false\" || value=== \"0\") {\n\t\treturn false;\n\t}\n\treturn Boolean(value);\n}\n\nvar maybeValues = Object.freeze([null, undefined]);\n\nfunction check(Type, val) {\n\tvar valueType = canString_1_1_0_canString.capitalize(typeof val);\n\tvar error = new Error('Type value ' + typeof val === \"string\" ? '\"' + val + '\"' : val + ' (' + valueType + ') is not of type ' + canReflect_1_19_2_canReflect.getName(Type) + '.'\t);\n\terror.type = 'can-type-error';\n\tthrow error;\n}\n\nfunction makeIsMember(Type) {\n\tif(isMemberSymbol in Type) {\n\t\treturn Type[isMemberSymbol];\n\t}\n\treturn function(value) {\n\t\treturn value instanceof Type;\n\t};\n}\n\nfunction makeBaseType(Type) {\n\tvar typeObject = {};\n\ttypeObject[newSymbol] = canNew;\n\ttypeObject[isMemberSymbol] = makeIsMember(Type);\n\ttypeObject[baseTypeSymbol] = Type;\n\ttypeObject[getSchemaSymbol] = makeSchema([Type]);\n\tType[strictTypeOfSymbol] = typeObject[strictTypeOfSymbol] = typeObject;\n\treturn typeObject;\n}\n\nfunction makePrimitiveType(Type, typeString) {\n\tvar typeObject = makeBaseType(Type);\n\tif(Type === Boolean) {\n\t\ttypeObject[newSymbol] = booleanNew;\n\t\ttypeObject[getSchemaSymbol] = makeSchema([true, false]);\n\t}\n\ttypeObject[isMemberSymbol] = function(value) {\n\t\treturn typeof value === typeString;\n\t};\n\treturn typeObject;\n}\n\nfunction getBaseType(Type) {\n\tif(typeof Type === \"function\") {\n\t\tif(canReflect_1_19_2_canReflect.hasOwnKey(Type, strictTypeOfSymbol)) {\n\t\t\treturn Type[strictTypeOfSymbol];\n\t\t}\n\t} else if(strictTypeOfSymbol in Type) {\n\t\treturn Type[strictTypeOfSymbol];\n\t}\n\treturn makeBaseType(Type);\n}\n\nfunction makeMaybe(Type) {\n\tvar isMember = Type[isMemberSymbol];\n\treturn function(value) {\n\t\treturn value == null || isMember.call(this, value);\n\t};\n}\n\nfunction makeMaybeSchema(baseType) {\n\tvar baseSchema = canReflect_1_19_2_canReflect.getSchema(baseType);\n\tvar allValues = baseSchema.values.concat(maybeValues);\n\treturn makeSchema(allValues);\n}\n\nfunction inheritFrom(o, Type, property) {\n\tif(property in Type) {\n\t\to[property] = Type[property];\n\t}\n}\n\nfunction wrapName(wrapper, Type) {\n\tvar baseName = canReflect_1_19_2_canReflect.getName(Type);\n\treturn \"type.\" + wrapper + \"(\" + baseName + \")\";\n}\n\ncanReflect_1_19_2_canReflect.each({\n\t\"boolean\": Boolean,\n\t\"number\": Number,\n\t\"string\": String\n}, function(Type, typeString) {\n\tmakePrimitiveType(Type, typeString);\n});\n\nfunction isTypeObject(Type) {\n\tif(canReflect_1_19_2_canReflect.isPrimitive(Type)) {\n\t\treturn false;\n\t}\n\n\treturn (newSymbol in Type) && (isMemberSymbol in Type);\n}\n\nfunction normalize(Type) {\n\tif(canReflect_1_19_2_canReflect.isPrimitive(Type)) {\n\t\tthrow new Error(\"can-type: Unable to normalize primitive values.\");\n\t} else if(isTypeObject(Type)) {\n\t\treturn Type;\n\t} else {\n\t\treturn type.check(Type);\n\t}\n}\n\nfunction late(fn) {\n\tvar lateType = {};\n\tvar underlyingType;\n\tvar unwrap = function() {\n\t\tunderlyingType = type.normalize(fn());\n\t\tunwrap = function() { return underlyingType; };\n\t\treturn underlyingType;\n\t};\n\treturn canReflect_1_19_2_canReflect.assignSymbols(lateType, {\n\t\t\"can.new\": function(val) {\n\t\t\treturn canReflect_1_19_2_canReflect.new(unwrap(), val);\n\t\t},\n\t\t\"can.isMember\": function(val) {\n\t\t\treturn unwrap()[isMemberSymbol](val);\n\t\t}\n\t});\n}\n\nvar Any = canReflect_1_19_2_canReflect.assignSymbols({}, {\n\t\"can.new\": function(val) { return val; },\n\t\"can.isMember\": function() { return true; }\n});\n\nfunction all(typeFn, Type) {\n\tvar typeObject = typeFn(Type);\n\ttypeObject[getSchemaSymbol] = function() {\n\t\tvar parentSchema = canReflect_1_19_2_canReflect.getSchema(Type);\n\t\tvar schema = canReflect_1_19_2_canReflect.assignMap({}, parentSchema);\n\t\tschema.keys = {};\n\t\tcanReflect_1_19_2_canReflect.eachKey(parentSchema.keys, function(value, key) {\n\t\t\tschema.keys[key] = typeFn(value);\n\t\t});\n\t\treturn schema;\n\t};\n\n\tfunction Constructor(values) {\n\t\tvar schema = canReflect_1_19_2_canReflect.getSchema(this);\n\t\tvar keys = schema.keys;\n\t\tvar convertedValues = {};\n\t\tcanReflect_1_19_2_canReflect.eachKey(values || {}, function(value, key) {\n\t\t\tconvertedValues[key] = canReflect_1_19_2_canReflect.convert(value, keys[key]);\n\t\t});\n\t\treturn canReflect_1_19_2_canReflect.new(Type, convertedValues);\n\t}\n\n\tcanReflect_1_19_2_canReflect.setName(Constructor, \"Converted<\" + canReflect_1_19_2_canReflect.getName(Type) + \">\");\n\tConstructor.prototype = typeObject;\n\n\treturn Constructor;\n}\n\nvar Integer = {};\nInteger[newSymbol] = function(value) {\n\t// parseInt(notANumber) returns NaN\n\t// Since we always want an integer returned\n\t// using |0 instead.\n\treturn value | 0;\n};\nInteger[isMemberSymbol] = function(value) {\n\t// “polyfill” for Number.isInteger because it’s not supported in IE11\n\treturn typeof value === \"number\" && isFinite(value) &&\n\t\tMath.floor(value) === value;\n};\nInteger[getSchemaSymbol] = makeSchema([Number]);\ncanReflect_1_19_2_canReflect.setName(Integer, \"Integer\");\n\nfunction makeCache(fn) {\n\tvar cache = new WeakMap();\n\treturn function(Type) {\n\t\tif(cache.has(Type)) {\n\t\t\treturn cache.get(Type);\n\t\t}\n\t\tvar typeObject = fn.call(this, Type);\n\t\tcache.set(Type, typeObject);\n\t\treturn typeObject;\n\t};\n}\n\nexports.check = makeCache(function(Type) {\n\tvar o = Object.create(getBaseType(Type));\n\to[newSymbol] = strictNew;\n\tinheritFrom(o, Type, isMemberSymbol);\n\tinheritFrom(o, Type, getSchemaSymbol);\n\tcanReflect_1_19_2_canReflect.setName(o, wrapName(\"check\", Type));\n\treturn o;\n});\n\nexports.convert = makeCache(function(Type) {\n\tvar o = Object.create(getBaseType(Type));\n\tinheritFrom(o, Type, isMemberSymbol);\n\tinheritFrom(o, Type, getSchemaSymbol);\n\tcanReflect_1_19_2_canReflect.setName(o, wrapName(\"convert\", Type));\n\treturn o;\n});\n\nexports.maybe = makeCache(function(Type) {\n\tvar baseType = getBaseType(Type);\n\tvar desc = {};\n\tdesc[newSymbol] = {\n\t\tvalue: strictNew\n\t};\n\tdesc[isMemberSymbol] = {\n\t\tvalue: makeMaybe(baseType)\n\t};\n\tdesc[getSchemaSymbol] = {\n\t\tvalue: makeMaybeSchema(baseType)\n\t};\n\tvar o = Object.create(baseType, desc);\n\tcanReflect_1_19_2_canReflect.setName(o, wrapName(\"maybe\", Type));\n\treturn o;\n});\n\nexports.maybeConvert = makeCache(function(Type) {\n\tvar baseType = getBaseType(Type);\n\tvar desc = {};\n\tdesc[isMemberSymbol] = {\n\t\tvalue: makeMaybe(baseType)\n\t};\n\tdesc[getSchemaSymbol] = {\n\t\tvalue: makeMaybeSchema(baseType)\n\t};\n\tvar o = Object.create(baseType, desc);\n\tcanReflect_1_19_2_canReflect.setName(o, wrapName(\"maybeConvert\", Type));\n\treturn o;\n});\n\n//!steal-remove-start\n// type checking should not throw in production\nif(process.env.NODE_ENV === 'production') {\n\texports.check = exports.convert;\n\texports.maybe = exports.maybeConvert;\n}\n//!steal-remove-end\n\nexports.Any = Any;\nexports.Integer = Integer;\n\nexports.late = late;\nexports.isTypeObject = isTypeObject;\nexports.normalize = normalize;\nexports.all = all;\nexports.convertAll = all.bind(null, exports.convert);\ncanNamespace_1_0_0_canNamespace.type = exports;\n});\nvar canType_1_1_6_canType_1 = canType_1_1_6_canType.check;\nvar canType_1_1_6_canType_2 = canType_1_1_6_canType.convert;\nvar canType_1_1_6_canType_3 = canType_1_1_6_canType.maybe;\nvar canType_1_1_6_canType_4 = canType_1_1_6_canType.maybeConvert;\nvar canType_1_1_6_canType_5 = canType_1_1_6_canType.Any;\nvar canType_1_1_6_canType_6 = canType_1_1_6_canType.Integer;\nvar canType_1_1_6_canType_7 = canType_1_1_6_canType.late;\nvar canType_1_1_6_canType_8 = canType_1_1_6_canType.isTypeObject;\nvar canType_1_1_6_canType_9 = canType_1_1_6_canType.normalize;\nvar canType_1_1_6_canType_10 = canType_1_1_6_canType.all;\nvar canType_1_1_6_canType_11 = canType_1_1_6_canType.convertAll;\n\nlet define; //jshint ignore:line\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst newSymbol$1 = Symbol.for(\"can.new\"),\n\tserializeSymbol = Symbol.for(\"can.serialize\"),\n\tinSetupSymbol$2 = Symbol.for(\"can.initializing\"),\n\tisMemberSymbol$1 = Symbol.for(\"can.isMember\"),\n\thasBeenDefinedSymbol = Symbol.for(\"can.hasBeenDefined\"),\n\tcanMetaSymbol = Symbol.for(\"can.meta\"),\n\tbaseTypeSymbol = Symbol.for(\"can.baseType\");\n\nlet eventsProto,\n\tmake, makeDefinition, getDefinitionsAndMethods, getDefinitionOrMethod;\n\n// UTILITIES\nfunction isDefineType(func){\n\treturn func && (func.canDefineType === true || func[newSymbol$1] );\n}\n\nfunction observableType() {\n\tthrow new Error(\"This is not currently implemented.\");\n}\n\nlet AsyncFunction;\nconst browserSupportsAsyncFunctions = (function() {\n\ttry {\n\t\tAsyncFunction = (async function(){}).constructor;\n\t\treturn true;\n\t} catch(e) {\n\t\treturn false;\n\t}\n}());\nfunction isAsyncFunction(fn) {\n\tif (!browserSupportsAsyncFunctions) {\n\t\treturn false;\n\t}\n\treturn fn && fn instanceof AsyncFunction;\n}\n\nconst peek$2 = canObservationRecorder_1_3_1_canObservationRecorder.ignore(canReflect_1_19_2_canReflect.getValue.bind(canReflect_1_19_2_canReflect));\n\nlet Object_defineNamedPrototypeProperty = Object.defineProperty;\n//!steal-remove-start\nif(process.env.NODE_ENV !== 'production') {\n\tObject_defineNamedPrototypeProperty = function(obj, prop, definition) {\n\t\tif (definition.get) {\n\t\t\tObject.defineProperty(definition.get, \"name\", {\n\t\t\t\tvalue: \"get \"+canReflect_1_19_2_canReflect.getName(obj) + \".\"+prop,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\tif (definition.set) {\n\t\t\tObject.defineProperty(definition.set, \"name\", {\n\t\t\t\tvalue: \"set \"+canReflect_1_19_2_canReflect.getName(obj) + \".\"+prop,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\treturn Object.defineProperty(obj, prop, definition);\n\t};\n}\n//!steal-remove-end\n\n\nfunction defineConfigurableAndNotEnumerable(obj, prop, value) {\n\tObject.defineProperty(obj, prop, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue: value\n\t});\n}\n\nfunction defineNotWritableAndNotEnumerable(obj, prop, value) {\n\tObject.defineProperty(obj, prop, {\n\t\tvalue: value,\n\t\tenumerable: false,\n\t\twritable: false\n\t});\n}\n\nfunction eachPropertyDescriptor(map, cb, ...args){\n\tfor(const prop of Object.getOwnPropertyNames(map)) {\n\t\tif(map.hasOwnProperty(prop)) {\n\t\t\tcb.call(map, prop, Object.getOwnPropertyDescriptor(map, prop), ...args);\n\t\t}\n\t}\n}\n\nfunction getEveryPropertyAndSymbol(obj) {\n\tconst props = Object.getOwnPropertyNames(obj);\n\tconst symbols = (\"getOwnPropertySymbols\" in Object) ?\n\t Object.getOwnPropertySymbols(obj) : [];\n\treturn props.concat(symbols);\n}\n\nvar define_1 = define = function(typePrototype, defines, baseDefine, propertyDefaults = {}) {\n\t// default property definitions on _data\n\tlet prop,\n\t\tdataInitializers = Object.create(baseDefine ? baseDefine.dataInitializers : null),\n\t\t// computed property definitions on _computed\n\t\tcomputedInitializers = Object.create(baseDefine ? baseDefine.computedInitializers : null),\n\t\trequired = new Set();\n\n\tconst result = getDefinitionsAndMethods(defines, baseDefine, typePrototype, propertyDefaults);\n\tresult.dataInitializers = dataInitializers;\n\tresult.computedInitializers = computedInitializers;\n\tresult.required = required;\n\n\t// Goes through each property definition and creates\n\t// a `getter` and `setter` function for `Object.defineProperty`.\n\tcanReflect_1_19_2_canReflect.eachKey(result.definitions, function(definition, property){\n\t\t// Add this as a required property\n\t\tif(definition.required === true) {\n\t\t\trequired.add(property);\n\t\t}\n\n\t\tdefine.property(typePrototype, property, definition, dataInitializers, computedInitializers, result.defaultDefinition);\n\t});\n\n\t// Places a `_data` on the prototype that when first called replaces itself\n\t// with a `_data` object local to the instance. It also defines getters\n\t// for any value that has a default value.\n\tif(typePrototype.hasOwnProperty(\"_data\")) {\n\t\tfor (prop in dataInitializers) {\n\t\t\tcanDefineLazyValue_1_1_1_defineLazyValue(typePrototype._data, prop, dataInitializers[prop].bind(typePrototype), true);\n\t\t}\n\t} else {\n\t\tcanDefineLazyValue_1_1_1_defineLazyValue(typePrototype, \"_data\", function() {\n\t\t\tconst map = this;\n\t\t\tconst data = {};\n\t\t\tfor (const prop in dataInitializers) {\n\t\t\t\tcanDefineLazyValue_1_1_1_defineLazyValue(data, prop, dataInitializers[prop].bind(map), true);\n\t\t\t}\n\t\t\treturn data;\n\t\t});\n\t}\n\n\t// Places a `_computed` on the prototype that when first called replaces itself\n\t// with a `_computed` object local to the instance. It also defines getters\n\t// that will create the property's compute when read.\n\tif(typePrototype.hasOwnProperty(\"_computed\")) {\n\t\tfor (prop in computedInitializers) {\n\t\t\tcanDefineLazyValue_1_1_1_defineLazyValue(typePrototype._computed, prop, computedInitializers[prop].bind(typePrototype));\n\t\t}\n\t} else {\n\t\tcanDefineLazyValue_1_1_1_defineLazyValue(typePrototype, \"_computed\", function() {\n\t\t\tconst map = this;\n\t\t\tconst data = Object.create(null);\n\t\t\tfor (const prop in computedInitializers) {\n\t\t\t\tcanDefineLazyValue_1_1_1_defineLazyValue(data, prop, computedInitializers[prop].bind(map));\n\t\t\t}\n\t\t\treturn data;\n\t\t});\n\t}\n\n\t// Add necessary event methods to this object.\n\tgetEveryPropertyAndSymbol(eventsProto).forEach(function(prop){\n\t\tObject.defineProperty(typePrototype, prop, {\n\t\t\tenumerable: false,\n\t\t\tvalue: eventsProto[prop],\n\t\t\tconfigurable: true,\n\t\t\twritable: true\n\t\t});\n\t});\n\t// also add any symbols\n\t// add so instance defs can be dynamically added\n\tObject.defineProperty(typePrototype,\"_define\",{\n\t\tenumerable: false,\n\t\tvalue: result,\n\t\tconfigurable: true,\n\t\twritable: true\n\t});\n\n\t// Places Symbol.iterator or @@iterator on the prototype\n\t// so that this can be iterated with for/of and canReflect.eachIndex\n\tconst iteratorSymbol = Symbol.iterator || Symbol.for(\"iterator\");\n\tif(!typePrototype[iteratorSymbol]) {\n\t\tdefineConfigurableAndNotEnumerable(typePrototype, iteratorSymbol, function(){\n\t\t\treturn new define.Iterator(this);\n\t\t});\n\t}\n\n\treturn result;\n};\n\nconst onlyType = function(obj){\n\tfor(const prop in obj) {\n\t\tif(prop !== \"type\") {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n};\n\nconst callAsync = function(fn) {\n\treturn function asyncResolver(lastSet, resolve){\n\t\tlet newValue = fn.call(this, resolve, lastSet);\n\n\t\t// This should really be happening in can-simple-observable/async/\n\t\t// But that would be a breaking change so putting it here.\n\t\tif(canReflect_1_19_2_canReflect.isPromise(newValue)) {\n\t\t\tnewValue.then(resolve);\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn newValue;\n\t};\n};\n\ndefine.extensions = function () {};\n\ndefine.isEnumerable = function(definition) {\n\treturn typeof definition !== \"object\" ||\n\t\t(\"serialize\" in definition ?\n\t\t\t!!definition.serialize :\n\t\t\t(!definition.get && !definition.async && !definition.value));\n};\n\n// typePrototype - the prototype of the type we are defining `prop` on.\n// `definition` - the user provided definition\ndefine.property = function(typePrototype, prop, definition, dataInitializers, computedInitializers, defaultDefinition) {\n\tconst propertyDefinition = define.extensions.apply(this, arguments);\n\n\tif (propertyDefinition) {\n\t\tdefinition = makeDefinition(prop, propertyDefinition, defaultDefinition || {}, typePrototype);\n\t}\n\n\tconst type = definition.type;\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tif(!definition.set && definition.get && definition.get.length === 0 && ( \"default\" in definition ) ) {\n\t\t\tdev.warn(\"can-observable-object: default value for property \" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+ prop +\n\t\t\t\t\t\" ignored, as its definition has a zero-argument getter and no setter\");\n\t\t}\n\n\tif(!definition.set && definition.get && definition.get.length === 0 && ( definition.type && definition.type !== defaultDefinition.type ) ) {\n\t\t\tdev.warn(\"can-observable-object: type value for property \" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+ prop +\n\t\t\t\t\t\" ignored, as its definition has a zero-argument getter and no setter\");\n\t\t}\n\t}\n\n\tfor (let defFuncProp of ['get', 'set', 'value']) {\n\t\tconst propType = definition[defFuncProp] && typeof definition[defFuncProp];\n\t\tif (propType && propType !== 'function') {\n\t\t\tdev.error(`can-observable-object: \"${defFuncProp}\" for property ${canReflect_1_19_2_canReflect.getName(typePrototype)}.${prop}` +\n\t\t\t\t` is expected to be a function, but it's a ${propType}.`);\n\t\t\treturn;\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\t// Special case definitions that have only `type: \"*\"`.\n\tif (type && onlyType(definition) && type === type.Any) {\n\t\tObject_defineNamedPrototypeProperty(typePrototype, prop, {\n\t\t\tget: make.get.data(prop),\n\t\t\tset: make.set.events(prop, make.get.data(prop), make.set.data(prop), make.eventType.data(prop)),\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\treturn;\n\t}\n\tdefinition.type = type;\n\n\t// Where the value is stored. If there is a `get` the source of the value\n\t// will be a compute in `this._computed[prop]`. If not, the source of the\n\t// value will be in `this._data[prop]`.\n\tlet dataProperty = definition.get || definition.async || definition.value ? \"computed\" : \"data\",\n\n\t\t// simple functions that all read/get/set to the right place.\n\t\t// - reader - reads the value but does not observe.\n\t\t// - getter - reads the value and notifies observers.\n\t\t// - setter - sets the value.\n\t\treader = make.read[dataProperty](prop),\n\t\tgetter = make.get[dataProperty](prop),\n\t\tsetter = make.set[dataProperty](prop),\n\t\tgetInitialValue;\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tif (definition.get) {\n\t\t\tObject.defineProperty(definition.get, \"name\", {\n\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(typePrototype) + \"'s \" + prop + \" getter\",\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\tif (definition.set) {\n\t\t\tObject.defineProperty(definition.set, \"name\", {\n\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(typePrototype) + \"'s \" + prop + \" setter\",\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\tif(definition.value) {\n\t\t\tObject.defineProperty(definition.value, \"name\", {\n\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(typePrototype) + \"'s \" + prop + \" value\",\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\t// Determine the type converter\n\tlet typeConvert = function(val) {\n\t\treturn val;\n\t};\n\n\tif (type) {\n\t\ttypeConvert = make.set.type(prop, type, typeConvert);\n\t}\n\n\t// make a setter that's going to fire of events\n\tconst eventsSetter = make.set.events(prop, reader, setter, make.eventType[dataProperty](prop));\n\tif(definition.value) {\n\t\tcomputedInitializers[prop] = make.resolver(prop, definition, typeConvert);\n\t}\n\t// Determine a function that will provide the initial property value.\n\telse if (definition.default !== undefined) {\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t// If value is an object or array, give a warning\n\t\t\tif (definition.default !== null && typeof definition.default === 'object') {\n\t\t\t\tdev.warn(\"can-observable-object: The default value for \" + canReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+prop + \" is set to an object. This will be shared by all instances of the DefineMap. Use a function that returns the object instead.\");\n\t\t\t}\n\t\t\t// If value is a constructor, give a warning\n\t\t\tif (definition.default && canReflect_1_19_2_canReflect.isConstructorLike(definition.default)) {\n\t\t\t\tdev.warn(\"can-observable-object: The \\\"default\\\" for \" + canReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+prop + \" is set to a constructor. Did you mean \\\"Default\\\" instead?\");\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\tgetInitialValue = canObservationRecorder_1_3_1_canObservationRecorder.ignore(make.get.defaultValue(prop, definition, typeConvert, eventsSetter));\n\t}\n\n\t// If property has a getter, create the compute that stores its data.\n\tif (definition.get) {\n\t\tcomputedInitializers[prop] = make.compute(prop, definition.get, getInitialValue);\n\t}\n\telse if (definition.async) {\n\t\tcomputedInitializers[prop] = make.compute(prop, callAsync(definition.async), getInitialValue);\n\t}\n\t// If the property isn't a getter, but has an initial value, setup a\n\t// default value on `this._data[prop]`.\n\telse if (getInitialValue) {\n\t\tdataInitializers[prop] = getInitialValue;\n\t}\n\n\t// Define setter behavior.\n\n\t// If there's a `get` and `set`, make the setter get the `lastSetValue` on the\n\t// `get`'s compute.\n\tif (definition.get && definition.set) {\n\t\t// the compute will set off events, so we can use the basic setter\n\t\tsetter = make.set.setter(prop, definition.set, make.read.lastSet(prop), setter, true);\n\t}\n\t// If there's a `set` and no `get`,\n\telse if (definition.set) {\n\t\t// Add `set` functionality to the eventSetter.\n\t\tsetter = make.set.setter(prop, definition.set, reader, eventsSetter, false);\n\t}\n\t// If there's neither `set` or `get` or `value` (resolver)\n\telse if (dataProperty === \"data\") {\n\t\t// make a set that produces events.\n\t\tsetter = eventsSetter;\n\t}\n\t// If there's zero-arg `get` but not `set`, warn on all sets in dev mode\n\telse if (definition.get && definition.get.length < 1) {\n\t\tsetter = function() {\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tdev.warn(\"can-observable-object: Set value for property \" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+ prop +\n\t\t\t\t\t\" ignored, as its definition has a zero-argument getter and no setter\");\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t};\n\t}\n\n\t// Add type behavior to the setter.\n\tif (type) {\n\t\tsetter = make.set.type(prop, type, setter);\n\t}\n\n\t// Define the property.\n\tObject_defineNamedPrototypeProperty(typePrototype, prop, {\n\t\tget: getter,\n\t\tset: setter,\n\t\tenumerable: define.isEnumerable(definition),\n\t\tconfigurable: true\n\t});\n};\n\ndefine.makeDefineInstanceKey = function(constructor) {\n\tconstructor[Symbol.for(\"can.defineInstanceKey\")] = function(property, value) {\n\t\tdefine.hooks.finalizeClass(this);\n\t\tconst defineResult = this.prototype._define;\n\t\tif(value && typeof value.value !== \"undefined\") {\n\t\t\tvalue.default = value.value;\n\t\t\tvalue.type = canType_1_1_6_canType.Any;\n\t\t\tdelete value.value;\n\t\t}\n\t\tconst definition = getDefinitionOrMethod(property, value, defineResult.defaultDefinition, this);\n\t\tif(definition && typeof definition === \"object\") {\n\t\t\tdefine.property(this.prototype, property, definition, defineResult.dataInitializers, defineResult.computedInitializers, defineResult.defaultDefinition);\n\t\t\tdefineResult.definitions[property] = definition;\n\t\t} else {\n\t\t\tdefineResult.methods[property] = definition;\n\t\t}\n\n\t\tthis.prototype.dispatch({\n\t\t\taction: \"can.keys\",\n\t\t\ttype: \"can.keys\",\n\t\t\ttarget: this.prototype\n\t\t});\n\t};\n};\n\n// Makes a simple constructor function.\ndefine.Constructor = function(defines, sealed) {\n\tconst constructor = function DefineConstructor(props) {\n\t\tObject.defineProperty(this, inSetupSymbol$2, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: true,\n\t\t\twritable: true\n\t\t});\n\t\tdefine.setup.call(this, props, sealed);\n\t\tthis[inSetupSymbol$2] = false;\n\t};\n\tconst result = define(constructor.prototype, defines);\n\ttype$1(constructor);\n\tdefine.makeDefineInstanceKey(constructor, result);\n\treturn constructor;\n};\n\n// A bunch of helper functions that are used to create various behaviors.\nmake = {\n\tcomputeObj: function(map, prop, observable) {\n\t\tconst computeObj = {\n\t\t\toldValue: undefined,\n\t\t\tcompute: observable,\n\t\t\tcount: 0,\n\t\t\thandler: function(newVal) {\n\t\t\t\tlet oldValue = computeObj.oldValue;\n\t\t\t\tcomputeObj.oldValue = newVal;\n\n\t\t\t\tmap.dispatch({\n\t\t\t\t\taction: \"prop\",\n\t\t\t\t\tkey: prop,\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\toldValue: oldValue,\n\t\t\t\t\ttype: prop,\n\t\t\t\t\ttarget: map\n\t\t\t\t}, [newVal, oldValue]);\n\t\t\t}\n\t\t};\n\t\treturn computeObj;\n\t},\n\tresolver: function(prop, definition, typeConvert) {\n\t\tconst getDefault = make.get.defaultValue(prop, definition, typeConvert);\n\t\treturn function(){\n\t\t\tconst map = this;\n\t\t\tconst defaultValue = getDefault.call(this);\n\t\t\tconst computeObj = make.computeObj(map, prop, new resolver(definition.value, map, defaultValue, {\n\t\t\t\tresetUnboundValueInGet: true\n\t\t\t}));\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tObject.defineProperty(computeObj.handler, \"name\", {\n\t\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(definition.value).replace('value', 'event emitter')\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\treturn computeObj;\n\t\t};\n\t},\n\t// Returns a function that creates the `_computed` prop.\n\tcompute: function(prop, get, defaultValueFn) {\n\n\t\treturn function() {\n\t\t\tconst map = this;\n\t\t\tconst defaultValue = defaultValueFn && defaultValueFn.call(this);\n\t\t\tlet observable, computeObj;\n\n\t\t\tif(get.length === 0) {\n\t\t\t\tobservable = new canObservation_4_2_0_canObservation(get, map);\n\t\t\t} else if(get.length === 1) {\n\t\t\t\tobservable = new settable(get, map, defaultValue);\n\t\t\t} else {\n\t\t\t\tobservable = new async(get, map, defaultValue);\n\t\t\t}\n\n\t\t\tcomputeObj = make.computeObj(map, prop, observable);\n\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tObject.defineProperty(computeObj.handler, \"name\", {\n\t\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(get).replace('getter', 'event emitter')\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\treturn computeObj;\n\t\t};\n\t},\n\t// Set related helpers.\n\tset: {\n\t\tdata: function(prop) {\n\t\t\treturn function(newVal) {\n\t\t\t\tthis._data[prop] = newVal;\n\t\t\t};\n\t\t},\n\t\tcomputed: function(prop) {\n\t\t\treturn function(val) {\n\t\t\t\tcanReflect_1_19_2_canReflect.setValue( this._computed[prop].compute, val );\n\t\t\t};\n\t\t},\n\t\tevents: function(prop, getCurrent, setData/*, eventType*/) {\n\t\t\treturn function(newVal) {\n\t\t\t\tif (this[inSetupSymbol$2]) {\n\t\t\t\t\tsetData.call(this, newVal);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconst current = getCurrent.call(this);\n\t\t\t\t\tif (newVal !== current) {\n\t\t\t\t\t\tlet dispatched;\n\t\t\t\t\t\tsetData.call(this, newVal);\n\n\t\t\t\t\t\tdispatched = {\n\t\t\t\t\t\t\tpatches: [{type: \"set\", key: prop, value: newVal}],\n\t\t\t\t\t\t\taction: \"prop\",\n\t\t\t\t\t\t\tkey: prop,\n\t\t\t\t\t\t\tvalue: newVal,\n\t\t\t\t\t\t\toldValue: current,\n\t\t\t\t\t\t\ttype: prop,\n\t\t\t\t\t\t\ttarget: this\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tdispatched.reasonLog = [ canReflect_1_19_2_canReflect.getName(this) + \"'s\", prop, \"changed to\", newVal, \"from\", current ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\t\tthis.dispatch(dispatched, [newVal, current]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\teventDispatcher: function(map, prop, current, newVal) {\n\t\t\tif (map[inSetupSymbol$2]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (newVal !== current) {\n\t\t\t\t\tconst dispatched = {\n\t\t\t\t\t\tpatches: [{type: \"set\", key: prop, value: newVal}],\n\t\t\t\t\t\taction: \"prop\",\n\t\t\t\t\t\tkey: prop,\n\t\t\t\t\t\tvalue: newVal,\n\t\t\t\t\t\toldValue: current,\n\t\t\t\t\t\ttype: prop,\n\t\t\t\t\t\ttarget: map\n\t\t\t\t\t};\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tdispatched.reasonLog = [ canReflect_1_19_2_canReflect.getName(this) + \"'s\", prop, \"changed to\", newVal, \"from\", current ];\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\tmap$1.dispatch.call(map, dispatched, [newVal, current]);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsetter: function(prop, setter, getCurrent, setEvents, hasGetter) {\n\t\t\treturn function(value) {\n\t\t\t\t//!steal-remove-start\n\t\t\t\tvar asyncTimer;\n\t\t\t\t//!steal-remove-end\n\n\t\t\t\tconst self = this;\n\n\t\t\t\t// call the setter, if returned value is undefined,\n\t\t\t\t// this means the setter is async so we\n\t\t\t\t// do not call update property and return right away\n\n\t\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\t\tconst setterCalled = false,\n\t\t\t\t\tcurrent = getCurrent.call(this),\n\t\t\t\t\tsetValue = setter.call(this, value, current);\n\n\t\t\t\tif (setterCalled) {\n\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t} else {\n\t\t\t\t\tif (hasGetter) {\n\t\t\t\t\t\t// we got a return value\n\t\t\t\t\t\tif (setValue !== undefined) {\n\t\t\t\t\t\t\t// if the current `set` value is returned, don't set\n\t\t\t\t\t\t\t// because current might be the `lastSetVal` of the internal compute.\n\t\t\t\t\t\t\tif (current !== setValue) {\n\t\t\t\t\t\t\t\tsetEvents.call(this, setValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this is a side effect, it didn't take a value\n\t\t\t\t\t\t// so use the original set value\n\t\t\t\t\t\telse if (setter.length === 0) {\n\t\t\t\t\t\t\tsetEvents.call(this, value);\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// it took a value\n\t\t\t\t\t\telse if (setter.length === 1) {\n\t\t\t\t\t\t\t// if we have a getter, and undefined was returned,\n\t\t\t\t\t\t\t// we should assume this is setting the getters properties\n\t\t\t\t\t\t\t// and we shouldn't do anything.\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// we are expecting something\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\t\tasyncTimer = setTimeout(function() {\n\t\t\t\t\t\t\t\t\tdev.warn('can-observable-object: Setter \"' + canReflect_1_19_2_canReflect.getName(self)+\".\"+prop + '\" did not return a value or call the setter callback.');\n\t\t\t\t\t\t\t\t}, dev.warnTimeout);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we got a return value\n\t\t\t\t\t\tif (setValue !== undefined) {\n\t\t\t\t\t\t\t// if the current `set` value is returned, don't set\n\t\t\t\t\t\t\t// because current might be the `lastSetVal` of the internal compute.\n\t\t\t\t\t\t\tsetEvents.call(this, setValue);\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this is a side effect, it didn't take a value\n\t\t\t\t\t\t// so use the original set value\n\t\t\t\t\t\telse if (setter.length === 0) {\n\t\t\t\t\t\t\tsetEvents.call(this, value);\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// it took a value\n\t\t\t\t\t\telse if (setter.length === 1) {\n\t\t\t\t\t\t\t// if we don't have a getter, we should probably be setting the\n\t\t\t\t\t\t\t// value to undefined\n\t\t\t\t\t\t\tsetEvents.call(this, undefined);\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// we are expecting something\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\t\tasyncTimer = setTimeout(function() {\n\t\t\t\t\t\t\t\t\tdev.warn('can/map/setter.js: Setter \"' + canReflect_1_19_2_canReflect.getName(self)+\".\"+prop + '\" did not return a value or call the setter callback.');\n\t\t\t\t\t\t\t\t}, dev.warnTimeout);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\ttype: function(prop, type, set) {\n\t\t\tfunction setter(newValue) {\n\t\t\t\treturn set.call(this, type.call(this, newValue, prop));\n\t\t\t}\n\t\t\tif(isDefineType(type)) {\n\t\t\t\t// TODO: remove this `canDefineType` check in a future release.\n\t\t\t\tif(type.canDefineType) {\n\t\t\t\t\treturn setter;\n\t\t\t\t} else {\n\t\t\t\t\treturn function setter(newValue){\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn set.call(this, canReflect_1_19_2_canReflect.convert(newValue, type));\n\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\tif (error.type === 'can-type-error') {\n\t\t\t\t\t\t\t\t\tconst typeName = canReflect_1_19_2_canReflect.getName(type[baseTypeSymbol]);\n\t\t\t\t\t\t\t\t\tconst valueType = typeof newValue;\n\t\t\t\t\t\t\t\t\tlet message = '\"' + newValue + '\"' + ' ('+ valueType + ') is not of type ' + typeName + '. Property ' + prop + ' is using \"type: ' + typeName + '\". ';\n\t\t\t\t\t\t\t\t\tmessage += 'Use \"' + prop + ': type.convert(' + typeName + ')\" to automatically convert values to ' + typeName + 's when setting the \"' + prop + '\" property.';\n\t\t\t\t\t\t\t\t\terror.message = message;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\treturn set.call(this, canReflect_1_19_2_canReflect.convert(newValue, type));\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn setter;\n\t\t}\n\t},\n\t// Helpes that indicate what the event type should be. These probably aren't needed.\n\teventType: {\n\t\tdata: function(prop) {\n\t\t\treturn function(newVal, oldVal) {\n\t\t\t\treturn oldVal !== undefined || this._data.hasOwnProperty(prop) ? \"set\" : \"add\";\n\t\t\t};\n\t\t},\n\t\tcomputed: function() {\n\t\t\treturn function() {\n\t\t\t\treturn \"set\";\n\t\t\t};\n\t\t}\n\t},\n\t// Helpers that read the data in a non-observable way.\n\tread: {\n\t\tdata: function(prop) {\n\t\t\treturn function() {\n\t\t\t\treturn this._data[prop];\n\t\t\t};\n\t\t},\n\t\tcomputed: function(prop) {\n\t\t\t// might want to protect this\n\t\t\treturn function() {\n\t\t\t\treturn canReflect_1_19_2_canReflect.getValue( this._computed[prop].compute );\n\t\t\t};\n\t\t},\n\t\tlastSet: function(prop) {\n\t\t\treturn function() {\n\t\t\t\tconst observable = this._computed[prop].compute;\n\t\t\t\tif(observable.lastSetValue) {\n\t\t\t\t\treturn canReflect_1_19_2_canReflect.getValue(observable.lastSetValue);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\t// Helpers that read the data in an observable way.\n\tget: {\n\t\t// uses the default value\n\t\tdefaultValue: function(prop, definition, typeConvert, callSetter) {\n\t\t\treturn function() {\n\t\t\t\tlet value = definition.default;\n\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t// call `get default() { ... }` but not `default() { ... }`\n\t\t\t\t\tif (typeof value === \"function\" && value.isAGetter) {\n\t\t\t\t\t\tvalue = value.call(this);\n\t\t\t\t\t}\n\t\t\t\t\tvalue = typeConvert.call(this, value);\n\t\t\t\t}\n\t\t\t\tif(definition.set) {\n\t\t\t\t\t// TODO: there's almost certainly a faster way of making this happen\n\t\t\t\t\t// But this is maintainable.\n\n\t\t\t\t\tlet VALUE;\n\t\t\t\t\tlet sync = true;\n\n\t\t\t\t\tconst setter = make.set.setter(prop, definition.set, function(){}, function(value){\n\t\t\t\t\t\tif(sync) {\n\t\t\t\t\t\t\tVALUE = value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcallSetter.call(this, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, definition.get);\n\n\t\t\t\t\tsetter.call(this,value);\n\t\t\t\t\tsync = false;\n\n\t\t\t\t\t// VALUE will be undefined if the callback is never called.\n\t\t\t\t\treturn VALUE;\n\n\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t};\n\t\t},\n\t\tdata: function(prop) {\n\t\t\treturn function() {\n\t\t\t\tif (!this[inSetupSymbol$2]) {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, prop);\n\t\t\t\t}\n\n\t\t\t\treturn this._data[prop];\n\t\t\t};\n\t\t},\n\t\tcomputed: function(prop) {\n\t\t\treturn function(/*val*/) {\n\t\t\t\tconst compute = this._computed[prop].compute;\n\t\t\t\tif (canObservationRecorder_1_3_1_canObservationRecorder.isRecording()) {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, prop);\n\t\t\t\t\tif (!canReflect_1_19_2_canReflect.isBound(compute)) {\n\t\t\t\t\t\tcanObservation_4_2_0_canObservation.temporarilyBind(compute);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn peek$2(compute);\n\t\t\t};\n\t\t}\n\t}\n};\n\ndefine.behaviors = [\"get\", \"set\", \"value\", \"type\", \"serialize\"];\n\n// This cleans up a particular behavior and adds it to the definition\nconst addBehaviorToDefinition = function(definition, behavior, descriptor, def, prop, typePrototype) {\n\tif(behavior === \"enumerable\") {\n\t\t// treat enumerable like serialize\n\t\tdefinition.serialize = !!def[behavior];\n\t}\n\telse if(behavior === \"type\") {\n\t\tconst behaviorDef = def[behavior];\n\t\tif (typeof behaviorDef !== 'undefined') {\n\t\t\tdefinition[behavior] = behaviorDef;\n\t\t}\n\t}\n\telse {\n\t\t// This is a good place to do warnings? This gets called for every behavior\n\t\t// Both by .define() and .property()\n\t\tconst value = descriptor.get || descriptor.value;\n\t\tif (descriptor.get) {\n\t\t\tvalue.isAGetter = true;\n\t\t}\n\t\tif(behavior === \"async\") {\n\t\t\tif(value.length === 1 && isAsyncFunction(value)) {\n\t\t\t\tdev.warn(`${canReflect_1_19_2_canReflect.getName(typePrototype)}: async property [${prop}] should not be an async function and also use the resolve() argument. Remove the argument and return a value from the async function instead.`);\n\t\t\t}\n\t\t}\n\n\t\tdefinition[behavior] = value;\n\t}\n};\n\n// This is called by `define.property` AND `getDefinitionOrMethod` (which is called by `define`)\n// Currently, this is adding default behavior\n// copying `type` over, and even cleaning up the final definition object\nmakeDefinition = function(prop, def, defaultDefinition, typePrototype) {\n\tlet definition = {};\n\n\teachPropertyDescriptor(def, function(behavior, descriptor) {\n\t\taddBehaviorToDefinition(definition, behavior, descriptor, def, prop, typePrototype);\n\t});\n\t// only add default if it doesn't exist\n\tcanReflect_1_19_2_canReflect.eachKey(defaultDefinition, function(value, prop){\n\t\tif(definition[prop] === undefined) {\n\t\t\tif(prop !== \"type\") {\n\t\t\t\tdefinition[prop] = value;\n\t\t\t}\n\t\t}\n\t});\n\n\tif (def.type) {\n\t\tconst value = def.type;\n\t\tconst serialize = value[serializeSymbol];\n\t\tif(serialize) {\n\t\t\tdefinition.serialize = function(val){\n\t\t\t\treturn serialize.call(val);\n\t\t\t};\n\t\t}\n\t\tdefinition.type = canType_1_1_6_canType.normalize(value);\n\t}\n\n\tconst noTypeDefined = !definition.type && (!defaultDefinition.type ||\n\t\tdefaultDefinition.type && defaultDefinition.typeSetByDefault);\n\n\tif (definition.hasOwnProperty(\"default\")) {\n\t\tif (typeof definition.default === \"function\" && !definition.default.isAGetter && noTypeDefined) {\n\t\t\tdefinition.type = canType_1_1_6_canType.normalize(Function);\n\t\t}\n\n\t\tif (canReflect_1_19_2_canReflect.isPrimitive(definition.default) && noTypeDefined) {\n\t\t\tif (definition.default === null || typeof definition.default === 'undefined') {\n\t\t\t\tdefinition.type = canType_1_1_6_canType.Any;\n\t\t\t} else {\n\t\t\t\tdefinition.type = canType_1_1_6_canType.normalize(definition.default.constructor);\n\t\t\t}\n\t\t}\n\t}\n\n\t// if there's no type definition, take it from the defaultDefinition\n\tif(!definition.type) {\n\t\tconst defaultsCopy = canReflect_1_19_2_canReflect.assignMap({}, defaultDefinition);\n\t\tdefinition = canReflect_1_19_2_canReflect.assignMap(defaultsCopy, definition);\n\t}\n\n\tif(canReflect_1_19_2_canReflect.size(definition) === 0) {\n\t\tdefinition.type = canType_1_1_6_canType.Any;\n\t\t// `setByDefault` indicates that the default type can be\n\t\t// overridden by an inferred type\n\t\tdefinition.typeSetByDefault = true;\n\t}\n\n\treturn definition;\n};\n\n// called by `can.defineInstanceKey` and `getDefinitionsAndMethods`\n// returns the value or the definition object.\n// calls makeDefinition\n// This is dealing with a string value\ngetDefinitionOrMethod = function(prop, value, defaultDefinition, typePrototype){\n\t// Clean up the value to make it a definition-like object\n\tlet definition;\n\tlet definitionType;\n\tif(canReflect_1_19_2_canReflect.isPrimitive(value)) {\n\t\tif (value === null || typeof value === 'undefined') {\n\t\t\tdefinitionType = canType_1_1_6_canType.Any;\n\t\t} else {\n\t\t\t// only include type from defaultDefininition\n\t\t\t// if it came from propertyDefaults\n\t\t\tdefinitionType = defaultDefinition.typeSetByDefault ?\n\t\t\t\tcanType_1_1_6_canType.normalize(value.constructor) :\n\t\t\t\tdefaultDefinition.type;\n\t\t}\n\t\tdefinition = {\n\t\t\tdefault: value,\n\t\t\ttype: definitionType\n\t\t};\n\t}\n // copies a `Type`'s methods over\n\telse if(value && (value[serializeSymbol] || value[newSymbol$1]) ) {\n\t\tif(value[isMemberSymbol$1]) {\n\t\t\tdefinition = { type: value };\n\t\t} else {\n\t\t\tdefinition = { type: canType_1_1_6_canType.normalize(value) };\n\t\t}\n\t}\n\telse if(typeof value === \"function\") {\n\t\tif(canReflect_1_19_2_canReflect.isConstructorLike(value)) {\n\t\t\tdefinition = { type: canType_1_1_6_canType.normalize(value) };\n\t\t} else {\n\t\t\tdefinition = { default: value, type: Function };\n\t\t}\n\t} else if( Array.isArray(value) ) {\n\t\tdefinition = { type: canType_1_1_6_canType.normalize(Array) };\n\t} else if( canReflect_1_19_2_canReflect.isPlainObject(value) ){\n\t\tdefinition = value;\n\t}\n\n\tif(definition) {\n\t\treturn makeDefinition(prop, definition, defaultDefinition, typePrototype);\n\t}\n\telse {\n\t\treturn value;\n\t}\n};\n// called by can.define\ngetDefinitionsAndMethods = function(defines, baseDefines, typePrototype, propertyDefaults) {\n\t// make it so the definitions include base definitions on the proto\n\tconst definitions = Object.create(baseDefines ? baseDefines.definitions : null);\n\tlet methods = {};\n\t// first lets get a default if it exists\n\tlet defaultDefinition;\n\tif(propertyDefaults) {\n\t\tdefaultDefinition = getDefinitionOrMethod(\"*\", propertyDefaults, {}, typePrototype);\n\t} else {\n\t\tdefaultDefinition = Object.create(null);\n\t}\n\n\tfunction addDefinition(prop, propertyDescriptor, skipGetDefinitionForMethods) {\n\t\tlet value;\n\t\tif(propertyDescriptor.get || propertyDescriptor.set) {\n\t\t\tvalue = { get: propertyDescriptor.get, set: propertyDescriptor.set };\n\t\t} else {\n\t\t\tvalue = propertyDescriptor.value;\n\t\t}\n\n\t\tif(prop === \"constructor\" || skipGetDefinitionForMethods && typeof value === \"function\") {\n\t\t\tmethods[prop] = value;\n\t\t\treturn;\n\t\t} else {\n\t\t\tconst result = getDefinitionOrMethod(prop, value, defaultDefinition, typePrototype);\n\t\t\tconst resultType = typeof result;\n\t\t\tif(result && resultType === \"object\" && canReflect_1_19_2_canReflect.size(result) > 0) {\n\t\t\t\tdefinitions[prop] = result;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Removed adding raw values that are not functions\n\t\t\t\tif (resultType === \"function\") {\n\t\t\t\t\tmethods[prop] = result;\n\t\t\t\t}\n\t\t\t\t//!steal-remove-start\n\t\t\t\telse if (resultType !== 'undefined') {\n\t\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t// Ex: {prop: 0}\n\t\t\t\t\t\tdev.error(canReflect_1_19_2_canReflect.getName(typePrototype)+\".\"+prop + \" does not match a supported definitionObject. See: https://canjs.com/doc/can-observable-object/object.types.definitionObject.html\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\t\t\t}\n\t\t}\n\t}\n\n\teachPropertyDescriptor(typePrototype, addDefinition, true);\n\teachPropertyDescriptor(defines, addDefinition);\n\tif(propertyDefaults) {\n\t\t// we should move this property off the prototype.\n\t\tdefineConfigurableAndNotEnumerable(defines, \"*\", propertyDefaults);\n\t}\n\treturn { definitions: definitions, methods: methods, defaultDefinition: defaultDefinition };\n};\n\neventsProto = map$1({});\n\nfunction setupComputed(instance, eventName) {\n\tconst computedBinding = instance._computed && instance._computed[eventName];\n\tif (computedBinding && computedBinding.compute) {\n\t\tif (!computedBinding.count) {\n\t\t\tcomputedBinding.count = 1;\n\t\t\tcanReflect_1_19_2_canReflect.onValue(computedBinding.compute, computedBinding.handler, \"notify\");\n\t\t\tcomputedBinding.oldValue = peek$2(computedBinding.compute);\n\t\t} else {\n\t\t\tcomputedBinding.count++;\n\t\t}\n\n\t}\n}\nfunction teardownComputed(instance, eventName){\n\tconst computedBinding = instance._computed && instance._computed[eventName];\n\tif (computedBinding) {\n\t\tif (computedBinding.count === 1) {\n\t\t\tcomputedBinding.count = 0;\n\t\t\tcanReflect_1_19_2_canReflect.offValue(computedBinding.compute, computedBinding.handler,\"notify\");\n\t\t} else {\n\t\t\tcomputedBinding.count--;\n\t\t}\n\t}\n}\n\ncanAssign_1_3_3_canAssign(eventsProto, {\n\t_eventSetup: function() {},\n\t_eventTeardown: function() {},\n\taddEventListener: function(eventName/*, handler, queue*/) {\n\t\tsetupComputed(this, eventName);\n\t\treturn map$1.addEventListener.apply(this, arguments);\n\t},\n\n\t// ### unbind\n\t// Stops listening to an event.\n\t// If this is the last listener of a computed property,\n\t// stop forwarding events of the computed property to this map.\n\tremoveEventListener: function(eventName/*, handler*/) {\n\t\tteardownComputed(this, eventName);\n\t\treturn map$1.removeEventListener.apply(this, arguments);\n\n\t}\n});\neventsProto.on = eventsProto.bind = eventsProto.addEventListener;\neventsProto.off = eventsProto.unbind = eventsProto.removeEventListener;\n\n\nconst onKeyValueSymbol$2 = Symbol.for(\"can.onKeyValue\");\nconst offKeyValueSymbol$1 = Symbol.for(\"can.offKeyValue\");\n\ncanReflect_1_19_2_canReflect.assignSymbols(eventsProto,{\n\t\"can.onKeyValue\": function(key){\n\t\tsetupComputed(this, key);\n\t\treturn map$1[onKeyValueSymbol$2].apply(this, arguments);\n\t},\n\t\"can.offKeyValue\": function(key){\n\t\tteardownComputed(this, key);\n\t\treturn map$1[offKeyValueSymbol$1].apply(this, arguments);\n\t}\n});\n\ndelete eventsProto.one;\n\ndefine.finalizeInstance = function() {\n\tdefineNotWritableAndNotEnumerable(this, \"constructor\", this.constructor);\n\tdefineNotWritableAndNotEnumerable(this, canMetaSymbol, Object.create(null));\n};\n\ndefine.setup = function(props, sealed) {\n\tconst requiredButNotProvided = new Set(this._define.required);\n\tconst definitions = this._define.definitions;\n\tconst instanceDefinitions = Object.create(null);\n\tconst map = this;\n\tcanReflect_1_19_2_canReflect.eachKey(props, function(value, prop){\n\t\tif(requiredButNotProvided.has(prop)) {\n\t\t\trequiredButNotProvided.delete(prop);\n\t\t}\n\t\tif(definitions[prop] !== undefined) {\n\t\t\tmap[prop] = value;\n\t\t} else {\n\t\t\tif(sealed) {\n\t\t\t\tthrow new Error(`The type ${canReflect_1_19_2_canReflect.getName(map.constructor)} is sealed, but the property [${prop}] has no definition.`);\n\t\t\t}\n\n\t\t\tdefine.expando(map, prop, value);\n\t\t}\n\t});\n\tif(canReflect_1_19_2_canReflect.size(instanceDefinitions) > 0) {\n\t\tdefineConfigurableAndNotEnumerable(this, \"_instanceDefinitions\", instanceDefinitions);\n\t}\n\tif(requiredButNotProvided.size) {\n\t\tlet msg;\n\t\tconst missingProps = Array.from(requiredButNotProvided);\n\t\tlet thisName = canReflect_1_19_2_canReflect.getName(this);\n\t\tif(requiredButNotProvided.size === 1) {\n\t\t\tmsg = `${thisName}: Missing required property [${missingProps[0]}].`;\n\t\t} else {\n\t\t\tmsg = `${thisName}: Missing required properties [${missingProps.join(\", \")}].`;\n\t\t}\n\n\t\tthrow new Error(msg);\n\t}\n};\n\n\nconst returnFirstArg = function(arg){\n\treturn arg;\n};\n\n// TODO Why is this exported, does it need to be?\ndefine.normalizeTypeDefinition = canType_1_1_6_canType.normalize;\n\ndefine.expando = function(map, prop, value) {\n\tif(define._specialKeys[prop]) {\n\t\t// ignores _data and _computed\n\t\treturn true;\n\t}\n\t// first check if it's already a constructor define\n\tconst constructorDefines = map._define.definitions;\n\tif(constructorDefines && constructorDefines[prop]) {\n\t\treturn;\n\t}\n\t// next if it's already on this instances\n\tlet instanceDefines = map._instanceDefinitions;\n\tif(!instanceDefines) {\n\t\tif(Object.isSealed(map)) {\n\t\t\tlet errorMessage = `Cannot set property [${prop}] on sealed instance of ${canReflect_1_19_2_canReflect.getName(map)}`;\n\t\t\tthrow new Error(errorMessage);\n\t\t}\n\t\tObject.defineProperty(map, \"_instanceDefinitions\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: {}\n\t\t});\n\t\tinstanceDefines = map._instanceDefinitions;\n\t}\n\tif(!instanceDefines[prop]) {\n\t\tconst defaultDefinition = map._define.defaultDefinition || { type: observableType };\n\t\tdefine.property(map, prop, defaultDefinition, {},{});\n\t\t// possibly convert value to List or DefineMap\n\t\tif(defaultDefinition.type) {\n\t\t\tmap._data[prop] = define.make.set.type(prop, defaultDefinition.type, returnFirstArg).call(map, value);\n\t\t} else {\n\t\t\tmap._data[prop] = observableType(value);\n\t\t}\n\n\t\tinstanceDefines[prop] = defaultDefinition;\n\t\tif(!map[inSetupSymbol$2]) {\n\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\tmap.dispatch({\n\t\t\t\taction: \"can.keys\",\n\t\t\t\ttype: \"can.keys\",\n\t\t\t\ttarget: map\n\t\t\t});\n\t\t\tif(Object.prototype.hasOwnProperty.call(map._data, prop)) {\n\t\t\t\tmap.dispatch({\n\t\t\t\t\taction: \"add\",\n\t\t\t\t\tkey: prop,\n\t\t\t\t\ttype: prop,\n\t\t\t\t\tvalue: map._data[prop],\n\t\t\t\t\ttarget: map,\n\t\t\t\t\tpatches: [{type: \"add\", key: prop, value: map._data[prop]}],\n\t\t\t\t},[map._data[prop], undefined]);\n\t\t\t} else {\n\t\t\t\tmap.dispatch({\n\t\t\t\t\taction: \"set\",\n\t\t\t\t\ttype: \"set\",\n\t\t\t\t\tvalue: map._data[prop],\n\t\t\t\t\ttarget: map,\n\t\t\t\t\tpatches: [{type: \"add\", key: prop, value: map._data[prop]}],\n\t\t\t\t},[map._data[prop], undefined]);\n\t\t\t}\n\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t}\n\t\treturn true;\n\t}\n};\ndefine.replaceWith = canDefineLazyValue_1_1_1_defineLazyValue;\ndefine.eventsProto = eventsProto;\ndefine.defineConfigurableAndNotEnumerable = defineConfigurableAndNotEnumerable;\ndefine.make = make;\ndefine.getDefinitionOrMethod = getDefinitionOrMethod;\ndefine._specialKeys = {_data: true, _computed: true};\nlet simpleGetterSetters = {};\ndefine.makeSimpleGetterSetter = function(prop){\n\tif(simpleGetterSetters[prop] === undefined) {\n\n\t\tconst setter = make.set.events(prop, make.get.data(prop), make.set.data(prop), make.eventType.data(prop) );\n\n\t\tsimpleGetterSetters[prop] = {\n\t\t\tget: make.get.data(prop),\n\t\t\tset: function(newVal){\n\t\t\t\treturn setter.call(this, observableType(newVal));\n\t\t\t},\n\t\t\tenumerable: true,\n configurable: true\n\t\t};\n\t}\n\treturn simpleGetterSetters[prop];\n};\n\ndefine.Iterator = function(obj){\n\tthis.obj = obj;\n\tthis.definitions = Object.keys(obj._define.definitions);\n\tthis.instanceDefinitions = obj._instanceDefinitions ?\n\t\tObject.keys(obj._instanceDefinitions) :\n\t\tObject.keys(obj);\n\tthis.hasGet = typeof obj.get === \"function\";\n};\n\ndefine.Iterator.prototype.next = function(){\n\tlet key;\n\tif(this.definitions.length) {\n\t\tkey = this.definitions.shift();\n\n\t\t// Getters should not be enumerable\n\t\tconst def = this.obj._define.definitions[key];\n\t\tif(def.get) {\n\t\t\treturn this.next();\n\t\t}\n\t} else if(this.instanceDefinitions.length) {\n\t\tkey = this.instanceDefinitions.shift();\n\t} else {\n\t\treturn {\n\t\t\tvalue: undefined,\n\t\t\tdone: true\n\t\t};\n\t}\n\n\treturn {\n\t\tvalue: [\n\t\t\tkey,\n\t\t\tthis.hasGet ? this.obj.get(key) : this.obj[key]\n\t\t],\n\t\tdone: false\n\t};\n};\n\ndefine.updateSchemaKeys = function(schema, definitions) {\n\tfor(const prop in definitions) {\n\t\tconst definition = definitions[prop];\n\t\tif(definition.serialize !== false ) {\n\t\t\tif(definition.type) {\n\t\t\t\tschema.keys[prop] = definition.type;\n\t\t\t} else {\n\t\t\t\tschema.keys[prop] = function(val){ return val; };\n\t\t\t}\n\t\t\t // some unknown type\n\t\t\tif(definitions[prop].identity === true) {\n\t\t\t\tschema.identity.push(prop);\n\t\t\t}\n\t\t}\n\t}\n\treturn schema;\n};\n\n\ndefine.hooks = {\n\tfinalizeClass: function(Type) {\n\t\tlet hasBeenDefined = Type.hasOwnProperty(hasBeenDefinedSymbol);\n\t\tif(!hasBeenDefined) {\n\t\t\tlet prototypeObject = Type.prototype;\n\t\t\t// check for `static props = {}`\n\t\t\t// fall back to `static define = {}` if `props` doesn't exist\n\t\t\tlet defines = typeof Type.props === \"object\" ?\n\t\t\t\tType.props :\n\t\t\t\ttypeof Type.define === \"object\" ?\n\t\t\t\t\tType.define :\n\t\t\t\t\t{};\n\t\t\tdefine(prototypeObject, defines, null, Type.propertyDefaults);\n\t\t\tType[hasBeenDefinedSymbol] = true;\n\t\t}\n\t},\n\tinitialize: function(instance, props) {\n\t\tconst firstInitialize = !instance.hasOwnProperty(canMetaSymbol);\n\t\tconst sealed = instance.constructor.seal;\n\n\t\tif (firstInitialize) {\n\t\t\tdefine.finalizeInstance.call(instance);\n\t\t}\n\n\t\tif (!instance[canMetaSymbol].initialized) {\n\t\t\tdefineConfigurableAndNotEnumerable(instance, inSetupSymbol$2, true);\n\n\t\t\tdefine.setup.call(instance, props, sealed);\n\n\t\t\t// set inSetup to false so events can be dispatched\n\t\t\tinstance[inSetupSymbol$2] = false;\n\n\t\t\t// set instance as initialized so this is only called once\n\t\t\tinstance[canMetaSymbol].initialized = true;\n\t\t}\n\n\t\t// only seal in dev mode for performance reasons.\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t// only seal the first time initialize is called\n\t\t\t// even if meta.initialized is reset to false\n\t\t\tif (firstInitialize) {\n\t\t\t\t/* jshint -W030 */\n\t\t\t\tinstance._data;\n\t\t\t\tinstance._computed;\n\t\t\t\tif(sealed === true) {\n\t\t\t\t\tObject.seal(instance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\t},\n\texpando: define.expando,\n\tnormalizeTypeDefinition: canType_1_1_6_canType.normalize //define.normalizeTypeDefinition\n};\n\n// Ensure the \"obj\" passed as an argument has an object on @@can.meta\nvar ensureMeta$3 = function ensureMeta(obj) {\n\tconst metaSymbol = Symbol.for(\"can.meta\");\n\tlet meta = obj[metaSymbol];\n\n\tif (!meta) {\n\t\tmeta = {};\n\t\tcanReflect_1_19_2_canReflect.setKeyValue(obj, metaSymbol, meta);\n\t}\n\n\treturn meta;\n};\n\n/*jshint -W079 */\n\n\n\n\n\n\nconst defineHelpers = {\n\t// returns `true` if the value was defined and set\n\tdefineExpando: define_1.expando,\n\treflectSerialize: function(unwrapped){\n\t\tconst constructorDefinitions = this._define.definitions;\n\t\tconst defaultDefinition = this._define.defaultDefinition;\n\t\tthis.forEach(function(val, name){\n\t\t\tconst propDef = constructorDefinitions[name];\n\n\t\t\tif(propDef && typeof propDef.serialize === \"function\") {\n\t\t\t\tval = propDef.serialize.call(this, val, name);\n\t\t\t}\n\t\t\telse if(defaultDefinition && typeof defaultDefinition.serialize === \"function\") {\n\t\t\t\tval = defaultDefinition.serialize.call(this, val, name);\n\t\t\t} else {\n\t\t\t\tval = canReflect_1_19_2_canReflect.serialize(val);\n\t\t\t}\n\t\t\tif(val !== undefined) {\n\t\t\t\tunwrapped[name] = val;\n\t\t\t}\n\t\t}, this);\n\t\treturn unwrapped;\n\t},\n\treflectUnwrap: function(unwrapped){\n\t\tthis.forEach(function(value, key){\n\t\t\tif(value !== undefined) {\n\t\t\t\tunwrapped[key] = canReflect_1_19_2_canReflect.unwrap(value);\n\t\t\t}\n\t\t});\n\t\treturn unwrapped;\n\t},\n\tlog: function(key) {\n\t\tconst instance = this;\n\n\t\tconst quoteString = function quoteString(x) {\n\t\t\treturn typeof x === \"string\" ? JSON.stringify(x) : x;\n\t\t};\n\n\t\tconst meta = ensureMeta$3(instance);\n\t\tconst allowed = meta.allowedLogKeysSet || new Set();\n\t\tmeta.allowedLogKeysSet = allowed;\n\n\t\tif (key) {\n\t\t\tallowed.add(key);\n\t\t}\n\n\t\tmeta._log = function(event, data) {\n\t\t\tconst type = event.type;\n\n\t\t\tif (\n\t\t\t\ttype === \"can.onPatches\" || (key && !allowed.has(type)) ||\n\t\t\t\ttype === \"can.keys\" || (key && !allowed.has(type))\n\t\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (type === \"add\" || type === \"remove\") {\n\t\t\t\tdev.log(\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(instance),\n\t\t\t\t\t\"\\n how \", quoteString(type),\n\t\t\t\t\t\"\\n what \", quoteString(data[0]),\n\t\t\t\t\t\"\\n index \", quoteString(data[1])\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// log `length` and `propertyName` events\n\t\t\t\tdev.log(\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(instance),\n\t\t\t\t\t\"\\n key \", quoteString(type),\n\t\t\t\t\t\"\\n is \", quoteString(data[0]),\n\t\t\t\t\t\"\\n was \", quoteString(data[1])\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t},\n\tdeleteKey: function(prop){\n\t\tconst instanceDefines = this._instanceDefinitions;\n\t\tif(instanceDefines && Object.prototype.hasOwnProperty.call(instanceDefines, prop) && !Object.isSealed(this)) {\n\t\t\tdelete instanceDefines[prop];\n\t\t\tdelete this[prop];\n\t\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\t\tthis.dispatch({\n\t\t\t\taction: \"can.keys\",\n\t\t\t\ttype: \"can.keys\",\n\t\t\t\ttarget: this\n\t\t\t});\n\t\t\tconst oldValue = this._data[prop];\n\t\t\tif(oldValue !== undefined) {\n\t\t\t\tdelete this._data[prop];\n\t\t\t\t//delete this[prop];\n\t\t\t\tthis.dispatch({\n\t\t\t\t\taction: \"delete\",\n\t\t\t\t\tkey: prop,\n\t\t\t\t\toldValue: oldValue,\n\t\t\t\t\ttype: prop,\n\t\t\t\t\ttarget: this,\n\t\t\t\t\tpatches: [{type: \"delete\", key: prop}],\n\t\t\t\t},[undefined,oldValue]);\n\t\t\t}\n\t\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\t} else {\n\t\t\tthis.set(prop, undefined);\n\t\t}\n\t\treturn this;\n\t}\n};\n\nvar defineHelpers_1 = defineHelpers;\n\nconst { updateSchemaKeys, hooks, isEnumerable } = define_1;\n\n\n\n\n\n\n\nconst getSchemaSymbol$1 = Symbol.for(\"can.getSchema\");\n\nfunction keysForDefinition(definitions) {\n\tconst keys = [];\n\tfor(let prop in definitions) {\n\t\tif(isEnumerable(definitions[prop])) {\n\t\t\tkeys.push(prop);\n\t\t}\n\t}\n\treturn keys;\n}\n\nfunction assign(source) {\n\tcanQueues_1_3_2_canQueues.batch.start();\n\tcanReflect_1_19_2_canReflect.assignMap(this, source || {});\n\tcanQueues_1_3_2_canQueues.batch.stop();\n}\nfunction update(source) {\n\tcanQueues_1_3_2_canQueues.batch.start();\n\tif (canReflect_1_19_2_canReflect.isListLike(source)) {\n\t\tcanReflect_1_19_2_canReflect.updateList(this, source);\n\t} else {\n\t\tcanReflect_1_19_2_canReflect.updateMap(this, source || {});\n\t}\n\tcanQueues_1_3_2_canQueues.batch.stop();\n}\nfunction assignDeep(source){\n\tcanQueues_1_3_2_canQueues.batch.start();\n\t// TODO: we should probably just throw an error instead of cleaning\n\tcanReflect_1_19_2_canReflect.assignDeepMap(this, source || {});\n\tcanQueues_1_3_2_canQueues.batch.stop();\n}\nfunction updateDeep(source){\n\tcanQueues_1_3_2_canQueues.batch.start();\n\tif (canReflect_1_19_2_canReflect.isListLike(source)) {\n\t\tcanReflect_1_19_2_canReflect.updateDeepList(this, source);\n\t} else {\n\t\t// TODO: we should probably just throw an error instead of cleaning\n\t\tcanReflect_1_19_2_canReflect.updateDeepMap(this, source || {});\n\t}\n\tcanQueues_1_3_2_canQueues.batch.stop();\n}\nfunction setKeyValue(key, value) {\n\tconst defined = defineHelpers_1.defineExpando(this, key, value);\n\tif(!defined) {\n\t\tthis[key] = value;\n\t}\n}\nfunction getKeyValue(key) {\n\tconst value = this[key];\n\tif(value !== undefined || key in this || Object.isSealed(this)) {\n\t\treturn value;\n\t} else {\n\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, key);\n\t\treturn this[key];\n\t}\n}\n\nvar mixinMapprops = function(Type) {\n\treturn class extends Type {\n\t\tstatic [getSchemaSymbol$1]() {\n\t\t\thooks.finalizeClass(this);\n\t\t\tlet def = this.prototype._define;\n\t\t\tlet definitions = def ? def.definitions : {};\n\t\t\tlet schema = {\n\t\t\t\ttype: \"map\",\n\t\t\t\tidentity: [],\n\t\t\t\tkeys: {}\n\t\t\t};\n\t\t\treturn updateSchemaKeys(schema, definitions);\n\t\t}\n\n\t\tget(prop){\n\t\t\tif(prop) {\n\t\t\t\treturn getKeyValue.call(this, prop);\n\t\t\t} else {\n\t\t\t\treturn canReflect_1_19_2_canReflect.unwrap(this, Map);\n\t\t\t}\n\t\t}\n\n\t\tset(prop, value){\n\t\t\tif(typeof prop === \"object\") {\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tdev.warn('can-define/map/map.prototype.set is deprecated; please use can-define/map/map.prototype.assign or can-define/map/map.prototype.update instead');\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\t\t\t\tif(value === true) {\n\t\t\t\t\tupdateDeep.call(this, prop);\n\t\t\t\t} else {\n\t\t\t\t\tassignDeep.call(this, prop);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsetKeyValue.call(this, prop, value);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\tassignDeep(prop) {\n\t\t\tassignDeep.call(this, prop);\n\t\t\treturn this;\n\t\t}\n\n\t\tupdateDeep(prop) {\n\t\t\tupdateDeep.call(this, prop);\n\t\t\treturn this;\n\t\t}\n\n\t\tassign(prop) {\n\t\t\tassign.call(this, prop);\n\t\t\treturn this;\n\t\t}\n\n\t\tupdate(prop) {\n\t\t\tupdate.call(this, prop);\n\t\t\treturn this;\n\t\t}\n\n\t\tserialize () {\n\t\t\treturn canReflect_1_19_2_canReflect.serialize(this, Map);\n\t\t}\n\n\t\tdeleteKey() {\n\t\t\treturn defineHelpers_1.deleteKey.apply(this, arguments);\n\t\t}\n\n\t\tforEach(cb, thisarg, observe) {\n\t\t\tfunction forEach(list, cb, thisarg){\n\t\t\t\treturn canReflect_1_19_2_canReflect.eachKey(list, cb, thisarg);\n\t\t\t}\n\n\t\t\tif(observe === false) {\n\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.ignore(forEach)(this, cb, thisarg);\n\t\t\t} else {\n\t\t\t\treturn forEach(this, cb, thisarg);\n\t\t\t}\n\t\t}\n\n\t\tstatic [Symbol.for(\"can.new\")](...args) {\n\t\t\treturn new this(...args);\n\t\t}\n\n\t\tget [Symbol.for(\"can.isMapLike\")]() {\n\t\t\treturn true;\n\t\t}\n\n\t\tget [Symbol.for(\"can.isListLike\")]() {\n\t\t\treturn false;\n\t\t}\n\n\t\tget [Symbol.for(\"can.isValueLike\")]() {\n\t\t\treturn false;\n\t\t}\n\n\t\t[Symbol.for(\"can.getKeyValue\")](...args) {\n\t\t\treturn getKeyValue.apply(this, args);\n\t\t}\n\n\t\t[Symbol.for(\"can.deleteKeyValue\")](...args) {\n\t\t\treturn defineHelpers_1.deleteKey.call(this, ...args);\n\t\t}\n\n\t\t[Symbol.for(\"can.getOwnKeys\")]() {\n\t\t\tconst keys = canReflect_1_19_2_canReflect.getOwnEnumerableKeys(this);\n\t\t\tif(this._computed) {\n\t\t\t\tconst computedKeys = canReflect_1_19_2_canReflect.getOwnKeys(this._computed);\n\n\t\t\t\tlet key;\n\t\t\t\tfor (let i=0; i= 0) {\n\t\t\t\t\treturn Reflect.defineProperty(target, prop, descriptor);\n\t\t\t\t}\n\n\t\t\t\tif (value) {\n\t\t\t\t\t// do not create expando properties for properties that are described\n\t\t\t\t\t// by `static props` or `static propertyDefaults`\n\t\t\t\t\tif (props && props[prop] || target.constructor.propertyDefaults) {\n\t\t\t\t\t\ttarget.set(prop, value);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// create expandos to make all other properties observable\n\t\t\t\t\treturn mixins$1.expando(target, prop, value);\n\t\t\t\t}\n\n\t\t\t\t// Prevent dispatching more than one event with canReflect.setKeyValue\n\t\t\t\treturn Reflect.defineProperty(target, prop, descriptor);\n\t\t\t}\n\t\t});\n\n\t\t// Adding the instance to observable-mixin \n\t\t// prevents additional event dispatching \n\t\t// https://github.com/canjs/can-observable-object/issues/35\n\t\tthis.constructor.instances.add(proxiedInstance);\n\t\treturn proxiedInstance;\n\t}\n\n};\n\nObservableObject = mixinTypeEvents$1(mixinMapProps(ObservableObject));\nmakeDefineInstanceKey$2(ObservableObject);\n\n// Export a constructor function to workaround an issue where ES2015 classes\n// cannot be extended in code that's transpiled by Babel.\nvar canObservableObject = canNamespace_1_0_0_canNamespace.ObservableObject = createConstructorFunction$1(\n\tObservableObject\n);\n\nconst { mixins: mixins$2 } = mixins;\n\n\nconst metaSymbol$3 = Symbol.for(\"can.meta\");\n\nconst helpers$1 = {\n\tassignNonEnumerable: function(obj, key, value) {\n\t\treturn Object.defineProperty(obj, key, {\n\t\t enumerable: false,\n\t\t writable: true,\n\t\t configurable: true,\n\t\t value: value\n\t\t});\n\t},\n\tshouldRecordObservationOnAllKeysExceptFunctionsOnProto: function(keyInfo, meta){\n\t\treturn meta.preventSideEffects === 0 && !keyInfo.isAccessor && (\n\t\t\t// it's on us\n\t\t\t(// it's on our proto, but not a function\n\t\t\t(keyInfo.targetHasOwnKey ) ||\n\t\t\t// it's \"missing\", and we are not sealed\n\t\t\t(!keyInfo.protoHasKey && !Object.isSealed(meta.target)) || keyInfo.protoHasKey && (typeof targetValue !== \"function\"))\n\t\t);\n\t},\n\t/*\n\t * dispatch an event when an index changes\n\t */\n\tdispatchIndexEvent: function(attr, how, newVal, oldVal) {\n\t\tvar index = +attr;\n\t\t// Make sure this is not nested and not an expando\n\t\tif (!isNaN(index)) {\n\t\t\tvar itemsDefinition = this._define.definitions[\"#\"];\n\t\t\tif (how === 'set') {\n\t\t\t\tthis.dispatch({\n\t\t\t\t\ttype: index,\n\t\t\t\t\taction: how,\n\t\t\t\t\tkey: index,\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\toldValue: oldVal\n\t\t\t\t}, [ newVal, oldVal ]);\n\n\t\t\t\t// if event is being set through an ObservableArray.prototype method,\n\t\t\t\t// do not dispatch length or patch events.\n\t\t\t\t// This will be handled by ObservableArray.prototype method.\n\t\t\t\tlet meta = this[metaSymbol$3];\n\t\t\t\tif (!(\"preventSideEffects\" in meta) || meta.preventSideEffects === 0) {\n\t\t\t\t\tlet patches = [{\n\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\tdeleteCount: 1,\n\t\t\t\t\t\tinsert: [ newVal ],\n\t\t\t\t\t\ttype: \"splice\"\n\t\t\t\t\t}];\n\t\t\t\t\thelpers$1.dispatchLengthPatch.call(this, how, patches, this.length, this.length);\n\t\t\t\t}\n\t\t\t} else if (how === 'add') {\n\t\t\t\tif (itemsDefinition && typeof itemsDefinition.added === 'function') {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.ignore(itemsDefinition.added).call(this, newVal, index);\n\t\t\t\t}\n\n\t\t\t\tthis.dispatch({\n\t\t\t\t\ttype: index,\n\t\t\t\t\taction: how,\n\t\t\t\t\tkey: index,\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\toldValue: oldVal\n\t\t\t\t}, [ newVal, oldVal ]);\n\n\t\t\t\t// if event is being set through an ObservableArray.prototype method,\n\t\t\t\t// do not dispatch length or patch events.\n\t\t\t\t// This will be handled by ObservableArray.prototype method.\n\t\t\t\tlet meta = this[metaSymbol$3];\n\t\t\t\tif (!(\"preventSideEffects\" in meta) || meta.preventSideEffects === 0) {\n\t\t\t\t\tlet patches = [{\n\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\tdeleteCount: 0,\n\t\t\t\t\t\tinsert: [ newVal ],\n\t\t\t\t\t\ttype: \"splice\"\n\t\t\t\t\t}];\n\t\t\t\t\thelpers$1.dispatchLengthPatch.call(this, how, patches, this.length, this.length - 1);\n\t\t\t\t}\n\t\t\t} else if (how === 'remove') {\n\t\t\t\tif (itemsDefinition && typeof itemsDefinition.removed === 'function') {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.ignore(itemsDefinition.removed).call(this, oldVal, index);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tvar key = \"\" + attr;\n\t\t\tthis.dispatch({\n\t\t\t\ttype: key,\n\t\t\t\tkey: key,\n\t\t\t\taction: how,\n\t\t\t\tvalue: newVal,\n\t\t\t\toldValue: oldVal,\n\t\t\t\ttarget: this\n\t\t\t}, [ newVal, oldVal ]);\n\t\t}\n\t},\n\t/*\n\t * Dispatch a `type: \"splice\"` patch and a `length` event\n\t */\n\tdispatchLengthPatch: function(how, patches, newLength, oldLength) {\n\t\tconst dispatchArgs = {\n\t\t\ttype: \"length\",\n\t\t\tkey: \"length\",\n\t\t\taction: how,\n\t\t\tvalue: newLength,\n\t\t\toldValue: oldLength,\n\t\t\tpatches: patches\n\t\t};\n\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== \"production\") {\n\t\t\tdispatchArgs.reasonLog = [canReflect_1_19_2_canReflect.getName(this) + \".\" + how + \" called with\", arguments];\n\t\t}\n\t\t//!steal-remove-end\n\n\t\tmap$1.dispatch.call(this, dispatchArgs, [newLength, oldLength]);\n\t},\n\n\tconvertItem: function(Constructor, item) {\n\t\tif(Constructor.items) {\n\t\t\tconst definition = mixins$2.normalizeTypeDefinition(Constructor.items.type || Constructor.items);\n\t\t\treturn canReflect_1_19_2_canReflect.convert(item, definition);\n\t\t}\n\t\treturn item;\n\t},\n\n\tconvertItems: function(Constructor, items) {\n\t\tif(items.length) {\n\t\t\tif(Constructor.items) {\n\t\t\t\tfor(let i = 0, len = items.length; i < len; i++) {\n\t\t\t\t\titems[i] = helpers$1.convertItem(Constructor, items[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t}\n};\n\nvar helpers_1$1 = helpers$1;\n\nvar canMeta = Symbol.for(\"can.meta\");\nconst computedPropertyDefinitionSymbol = Symbol.for(\"can.computedPropertyDefinitions\");\nconst onKeyValueSymbol$3 = Symbol.for(\"can.onKeyValue\");\nconst offKeyValueSymbol$2 = Symbol.for(\"can.offKeyValue\");\n\n// ## ComputedObjectObservationData\n// Instances of this are created to wrap the observation.\n// The `.bind` and `.unbind` methods should be called when the\n// instance's prop is bound or unbound.\nfunction ComputedObjectObservationData(instance, prop, observation){\n\tthis.instance = instance;\n this.prop = prop;\n this.observation = observation;\n\tthis.forward = this.forward.bind(this);\n}\n\nComputedObjectObservationData.prototype.bind = function(){\n this.bindingCount++;\n if(this.bindingCount === 1) {\n this.observation.on(this.forward, \"notify\");\n }\n};\n\nComputedObjectObservationData.prototype.unbind = function(){\n this.bindingCount--;\n if(this.bindingCount === 0) {\n this.observation.off(this.forward, \"notify\");\n }\n};\n\nComputedObjectObservationData.prototype.forward = function(newValue, oldValue){\n\tmap$1.dispatch.call(this.instance, {\n\t\ttype: this.prop,\n\t\tkey: this.prop,\n\t\ttarget: this.instance,\n\t\tvalue: newValue,\n\t\toldValue: oldValue\n\n\t\t// patches: [{\n\t\t// \tkey: this.prop,\n\t\t// \ttype: \"set\",\n\t\t// \tvalue: newValue\n\t\t// }]\n\t\t// keyChanged: undefined\n\t}, [newValue, oldValue]);\n};\n\nComputedObjectObservationData.prototype.bindingCount = 0;\n\nfunction findComputed(instance, key) {\n\tvar meta = instance[canMeta];\n\tvar target = meta.target;\n\n\tvar computedPropertyDefinitions = target[computedPropertyDefinitionSymbol];\n\tif (computedPropertyDefinitions === undefined) {\n\t\treturn;\n\t}\n\tvar computedPropertyDefinition = computedPropertyDefinitions[key];\n\tif (computedPropertyDefinition === undefined) {\n\t\treturn;\n\t}\n\n\tif (meta.computedKeys[key] === undefined) {\n\t\tmeta.computedKeys[key] = new ComputedObjectObservationData(\n\t\t\tinstance, key,\n\t\t\tcomputedPropertyDefinition(instance, key)\n\t\t);\n\t}\n\n\treturn meta.computedKeys[key];\n}\n\nconst computedHelpers = {\n\tbind: function(instance, key) {\n\t\tlet computedObj = findComputed(instance, key);\n\t\tif (computedObj === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputedObj.bind();\n\t},\n\taddKeyDependencies: function(proxyKeys) {\n\t\tlet onKeyValue = proxyKeys[onKeyValueSymbol$3];\n\t\tlet offKeyValue = proxyKeys[offKeyValueSymbol$2];\n\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(proxyKeys, {\n\t\t\t\"can.onKeyValue\": function(key) {\n\t\t\t\tcomputedHelpers.bind(this, key);\n\t\t\t\treturn onKeyValue.apply(this, arguments);\n\t\t\t},\n\t\t\t\"can.offKeyValue\": function(key) {\n\t\t\t\tcomputedHelpers.unbind(this, key);\n\t\t\t\treturn offKeyValue.apply(this, arguments);\n\t\t\t},\n\t\t\t\"can.getKeyDependencies\": function(key) {\n\t\t\t\tvar computedObj = findComputed(this, key);\n\t\t\t\tif (computedObj === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tvalueDependencies: new Set([ computedObj.observation ])\n\t\t\t\t};\n\t\t\t},\n\t\t});\n\t}\n};\n\nvar computedHelpers_1 = computedHelpers;\n\nconst {\n\tassignNonEnumerable,\n\tconvertItem,\n\tdispatchIndexEvent,\n\tshouldRecordObservationOnAllKeysExceptFunctionsOnProto\n} = helpers_1$1;\nconst { mixins: mixins$3 } = mixins;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\nconst { isSymbolLike: isSymbolLike$1 } = canReflect_1_19_2_canReflect;\nconst metaSymbol$4 = Symbol.for(\"can.meta\");\n\nconst proxiedObjects = new WeakMap();\nconst proxies = new WeakSet();\n\nconst proxyKeys = Object.create(null);\nObject.getOwnPropertySymbols(map$1).forEach(function(symbol){\n\tassignNonEnumerable(proxyKeys, symbol, map$1[symbol]);\n});\ncomputedHelpers_1.addKeyDependencies(proxyKeys);\n\nconst mutateMethods = {\n\t\"push\": function(arr, args) {\n\t\treturn [{\n\t\t\tindex: arr.length - args.length,\n\t\t\tdeleteCount: 0,\n\t\t\tinsert: args,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"pop\": function(arr) {\n\t\treturn [{\n\t\t\tindex: arr.length,\n\t\t\tdeleteCount: 1,\n\t\t\tinsert: [],\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"shift\": function() {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: 1,\n\t\t\tinsert: [],\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"unshift\": function(arr, args) {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: 0,\n\t\t\tinsert: args,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"splice\": function(arr, args) {\n\t\treturn [{\n\t\t\tindex: args[0],\n\t\t\tdeleteCount: args[1],\n\t\t\tinsert: args.slice(2),\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"sort\": function(arr) {\n\t\t// The array replaced everything.\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: arr.length,\n\t\t\tinsert: arr,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"reverse\": function(arr) {\n\t\t// The array replaced everything.\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: arr.length,\n\t\t\tinsert: arr,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t}\n};\n\n// Overwrite Array's methods that mutate to:\n// - prevent other events from being fired off (index events and length events.)\n// - dispatch patches events.\ncanReflect_1_19_2_canReflect.eachKey(mutateMethods, function(makePatches, prop){\n\tvar protoFn = Array.prototype[prop];\n\tvar mutateMethod = function() {\n\t\tvar meta = this[metaSymbol$4],\n\t\t\t// Capture if this function should be making sideEffects\n\t\t\tmakeSideEffects = meta.preventSideEffects === 0,\n\t\t\toldLength = meta.target.length;\n\n\t\t// Prevent proxy from calling ObservationRecorder and sending events.\n\t\tmeta.preventSideEffects++;\n\n\t\t// Call the function -- note that *this* is the Proxy here, so\n\t\t// accesses in the function still go through `get()` and `set()`.\n\t\tvar ret = protoFn.apply(meta.target, arguments);\n\t\tvar patches = makePatches(meta.target, Array.from(arguments), oldLength);\n\n\t\tif (makeSideEffects === true) {\n\t\t\t//!steal-remove-start\n\t\t\tvar reasonLog = [canReflect_1_19_2_canReflect.getName(meta.proxy)+\".\"+prop+\" called with\", arguments];\n\t\t\t//!steal-remove-end\n\t\t\tvar dispatchArgs = {\n\t\t\t\ttype: \"length\",\n\t\t\t\tkey: \"length\",\n\t\t\t\tvalue: meta.target.length,\n\t\t\t\toldValue: oldLength,\n\t\t\t\tpatches: patches\n\t\t\t};\n\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tdispatchArgs.reasonLog = reasonLog;\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\tmap$1.dispatch.call( meta.proxy, dispatchArgs , [meta.target.length, oldLength]);\n\t\t}\n\n\t\tmeta.preventSideEffects--;\n\t\treturn ret;\n\t};\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(mutateMethod, \"name\", {\n\t\t\tvalue: prop\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\t// Store the proxied method so it will be used instead of the\n\t// prototype method.\n\tproxiedObjects.set(protoFn, mutateMethod);\n\tproxies.add(mutateMethod);\n});\n\nfunction setValueAndOnChange(key, value, target, proxy, onChange) {\n\tlet old, change;\n\tlet hadOwn = hasOwn.call(target, key);\n\n\tlet descriptor = Object.getOwnPropertyDescriptor(target, key);\n\t// call the setter on the Proxy to properly do any side-effect sets (and run corresponding handlers)\n\t// -- setters do not return values, so it is unnecessary to check for changes.\n\tif (descriptor && descriptor.set) {\n\t\tdescriptor.set.call(proxy, value);\n\t} else {\n\t\t// otherwise check for a changed value\n\t\told = target[key];\n\t\tchange = old !== value;\n\t\tif (change) {\n\t\t\tlet keyType = typeof key;\n\t\t\tlet keyIsString = keyType === \"string\";\n\n\t\t\t// String keys added to the instance (and is not \"length\")\n\t\t\t// Are newly defined properties and have propertyDefaults provided.\n\t\t\tif(keyIsString && !(key in target)) {\n\t\t\t\tmixins$3.expando(target, key, value);\n\t\t\t} else {\n\t\t\t\t// arr[0] = { foo: 'bar' } should convert to MyArray.items\n\t\t\t\tif(keyType === \"number\") {\n\t\t\t\t\tvalue = convertItem(target.constructor, value);\n\t\t\t\t}\n\n\t\t\t\ttarget[key] = value;\n\t\t\t\tonChange(hadOwn, old);\n\t\t\t}\n\t\t}\n\t}\n}\n\nconst proxyHandlers = {\n\tget(target, key, receiver) {\n\t\tif (isSymbolLike$1(key)) {\n\t\t\treturn target[key];\n\t\t}\n\n\t\tlet proxy = proxiedObjects.get(target);\n\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(proxy, key.toString());\n\n\t\tconst numberKey = !isSymbolLike$1(key) && +key;\n\t\tif (Number.isInteger(numberKey)) {\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(proxy, \"length\");\n\t\t}\n\t\t\n\t\tlet value = Reflect.get(target, key, receiver);\n\t\treturn value;\n\t},\n\n\tset(target, key, newValue, receiver) {\n\t\tlet proxy = proxiedObjects.get(target);\n\t\tlet numberKey = !isSymbolLike$1(key) && +key;\n\n\t\tif (Number.isInteger(numberKey)) {\n\t\t\tkey = numberKey;\n\t\t}\n\n\t\tsetValueAndOnChange(key, newValue, target, proxy, function onChange(hadOwn, oldValue) {\n\n\t\t\tif (Number.isInteger(key)) {\n\t\t\t\tdispatchIndexEvent.call(\n\t\t\t\t\treceiver,\n\t\t\t\t\tkey,\n\t\t\t\t\thadOwn ? (typeof newValue !== 'undefined' ? \"set\" : \"remove\") : \"add\",\n\t\t\t\t\tnewValue,\n\t\t\t\t\toldValue\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\treturn true;\n\t},\n\tdeleteProperty(target, key) {\n\t\tlet old = this.target[key];\n\t\tlet deleteSuccessful = delete this.target[key];\n\n\t\t// Fire event handlers if we were able to delete and the value changed.\n\t\tif (deleteSuccessful && this.preventSideEffects === 0 && old !== undefined) {\n\t\t\tdispatchIndexEvent.call(\n\t\t\t\tthis.proxy,\n\t\t\t\tkey,\n\t\t\t\t\"remove\",\n\t\t\t\tundefined,\n\t\t\t\told\n\t\t\t);\n\t\t}\n\n\t\treturn deleteSuccessful;\n\t},\n\townKeys() {\n\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this.proxy, \"can.keys\");\n\n\t\tlet keysSet = new Set(\n\t\t\tObject.getOwnPropertyNames(this.target)\n\t\t\t\t.concat(Object.getOwnPropertySymbols(this.target))\n\t\t\t\t.concat(Object.getOwnPropertySymbols(this.proxyKeys))\n\t\t);\n\n\t\treturn Array.from(keysSet);\n\t}\n};\n\nfunction makeObservable(array, options) {\n\tlet meta = {\n\t\ttarget: array,\n\t\tproxyKeys: options.proxyKeys !== undefined ? options.proxyKeys : Object.create(proxyKeys),\n\t\tcomputedKeys: Object.create(null),\n\t\toptions: options,\n\t\t// `preventSideEffects` is a counter used to \"turn off\" the proxy. This is incremented when some\n\t\t// function (like `Array.splice`) wants to handle event dispatching and/or calling\n\t\t// `ObservationRecorder` itself for performance reasons.\n\t\tpreventSideEffects: 0\n\t};\n\tmeta.proxyKeys[metaSymbol$4] = meta;\n\n\tmeta.proxy = new Proxy(array, {\n\t\tget: proxyHandlers.get.bind(meta),\n\t\tset: proxyHandlers.set.bind(meta),\n\t\townKeys: proxyHandlers.ownKeys.bind(meta),\n\t\tdeleteProperty: proxyHandlers.deleteProperty.bind(meta),\n\t\tmeta: meta\n\t});\n\tmap$1.addHandlers(meta.proxy, meta);\n\treturn meta.proxy;\n}\n\nfunction proxyArray() {\n\treturn class ProxyArray extends Array {\n\t\tconstructor(...items) {\n\t\t\tsuper(...items);\n\n\t\t\tlet localProxyKeys = Object.create(proxyKeys);\n \tlocalProxyKeys.constructor = this.constructor;\n\n\t\t\tlet observable = makeObservable(this, {\n\t\t\t\t//observe: makeObserve.observe,\n \t\t\t\tproxyKeys: localProxyKeys,\n \t\t\t\tshouldRecordObservation: shouldRecordObservationOnAllKeysExceptFunctionsOnProto\n\t\t\t});\n\t\t\tproxiedObjects.set(this, observable);\n\t\t\tproxies.add(observable);\n\t\t\treturn observable;\n\t\t}\n\t};\n}\n\nvar proxyArray_1 = proxyArray;\n\nconst {\n\tcreateConstructorFunction: createConstructorFunction$2,\n\tmakeDefineInstanceKey: makeDefineInstanceKey$3,\n\tmixins: mixins$4,\n\tmixinMapProps: mixinMapProps$1,\n\tmixinTypeEvents: mixinTypeEvents$2\n} = mixins;\nconst {\n\tconvertItem: convertItem$1,\n\tconvertItems,\n\tdispatchLengthPatch\n} = helpers_1$1;\n\nconst ProxyArray = proxyArray_1();\n\n\n\n// symbols aren't enumerable ... we'd need a version of Object that treats them that way\nconst localOnPatchesSymbol = \"can.patches\";\nconst onKeyValueSymbol$4 = Symbol.for(\"can.onKeyValue\");\nconst offKeyValueSymbol$3 = Symbol.for(\"can.offKeyValue\");\nconst metaSymbol$5 = Symbol.for(\"can.meta\");\n\nfunction isListLike$1(items) {\n\treturn canReflect_1_19_2_canReflect.isListLike(items) && typeof items !== \"string\";\n}\n\nconst MixedInArray = mixinTypeEvents$2(mixinMapProps$1(ProxyArray));\n\nclass ObservableArray extends MixedInArray {\n\t// TODO define stuff here\n\tconstructor(items, props) {\n\t\t// Arrays can be passed a length like `new Array(15)`\n\t\tlet isLengthArg = typeof items === \"number\";\n\t\tif(isLengthArg) {\n\t\t\tsuper(items);\n\t\t} else if(arguments.length > 0 && !isListLike$1(items)) {\n\t\t\tthrow new Error(\"can-observable-array: Unexpected argument: \" + typeof items);\n\t\t} else {\n\t\t\tsuper();\n\t\t}\n\n\t\tmixins$4.finalizeClass(this.constructor);\n\t\tmixins$4.initialize(this, props || {});\n\n\t\tfor(let i = 0, len = items && items.length; i < len; i++) {\n\t\t\tthis[i] = convertItem$1(this.constructor, items[i]);\n\t\t}\n\n\t\t// Define class fields observables\n\t\t//and return the proxy\n\t\treturn new Proxy(this, {\n\t\t\tdefineProperty(target, prop, descriptor) {\n\t\t\t\tif ('items' === prop) {\n\t\t\t\t\tthrow new Error('ObservableArray does not support a class field named items. Try using a different name or using static items');\n\t\t\t\t}\n\n\t\t\t\t// do not create expando properties for special keys set by can-observable-mixin\n\t\t\t\tif (prop === '_instanceDefinitions') {\n\t\t\t\t\treturn Reflect.defineProperty(target, prop, descriptor);\n\t\t\t\t}\n\n\t\t\t\tlet value = descriptor.value;\n\n\t\t\t\t// do not create expando properties for properties that are described\n\t\t\t\t// by `static props` or `static propertyDefaults`\n\t\t\t\tconst props = target.constructor.props;\n\t\t\t\tif (props && props[prop] || target.constructor.propertyDefaults) {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\ttarget.set(prop, value);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn Reflect.defineProperty(target, prop, descriptor);\n\t\t\t\t}\n\n\t\t\t\t// create expandos to make all other properties observable\n\t\t\t\treturn mixins$4.expando(target, prop, value);\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic get [Symbol.species]() {\n\t\treturn this;\n\t}\n\n\tstatic [Symbol.for(\"can.new\")](items) {\n\t\tlet array = items || [];\n\t\treturn new this(array);\n\t}\n\n\tpush(...items) {\n\t\treturn super.push(...items);\n\t}\n\n\tunshift(...items) {\n\t\treturn super.unshift(...items);\n\t}\n\n\tfilter(callback) {\n\t\tif(typeof callback === \"object\") {\n\t\t\tlet props = callback;\n\t\t\tcallback = function(item) {\n\t\t\t\tfor (let prop in props) {\n\t\t\t\t\tif (item[prop] !== props[prop]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\n\t\treturn super.filter(callback);\n\t}\n\n\tforEach(...args) {\n\t\treturn Array.prototype.forEach.apply(this, args);\n\t}\n\n\tsplice(...args) {\n\t\tlet index = args[0],\n\t\t\thowMany = args[1],\n\t\t\tadded = [],\n\t\t\ti, len, listIndex,\n\t\t\tallSame = args.length > 2;\n\n\t\tindex = index || 0;\n\n\t\t// converting the arguments to the right type\n\t\tfor (i = 0, len = args.length - 2; i < len; i++) {\n\t\t\tlistIndex = i + 2;\n\t\t\tadded.push(args[listIndex]);\n\n\t\t\t// Now lets check if anything will change\n\t\t\tif (this[i + index] !== args[listIndex]) {\n\t\t\t\tallSame = false;\n\t\t\t}\n\t\t}\n\n\t\t// if nothing has changed, then return\n\t\tif (allSame && this.length <= added.length) {\n\t\t\treturn added;\n\t\t}\n\n\t\t// default howMany if not provided\n\t\tif (howMany === undefined) {\n\t\t\thowMany = args[1] = this.length - index;\n\t\t}\n\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\tvar removed = super.splice.apply(this, args);\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t\treturn removed;\n\t}\n\n\tstatic convertsTo(Type) {\n\t\tconst ConvertedType = canType_1_1_6_canType.convert(Type);\n\n\t\tconst ArrayType = class extends this {\n\t\t\tstatic get items() {\n\t\t\t\treturn ConvertedType;\n\t\t\t}\n\t\t};\n\n\t\tconst name = `ConvertedObservableArray<${canReflect_1_19_2_canReflect.getName(Type)}>`;\n\t\tcanReflect_1_19_2_canReflect.setName(ArrayType, name);\n\n\t\treturn ArrayType;\n\t}\n\n\t/* Symbols */\n\t[Symbol.for(\"can.splice\")](index, deleteCount, insert){\n\t\treturn this.splice(...[index, deleteCount].concat(insert));\n\t}\n\n\t[Symbol.for(\"can.onPatches\")](handler, queue){\n\t\tthis[onKeyValueSymbol$4](localOnPatchesSymbol, handler,queue);\n\t}\n\n\t[Symbol.for(\"can.offPatches\")](handler, queue) {\n\t\tthis[offKeyValueSymbol$3](localOnPatchesSymbol, handler, queue);\n\t}\n\n\tget [Symbol.for(\"can.isListLike\")]() {\n\t\treturn true;\n\t}\n\n\t[Symbol.for(\"can.getOwnEnumerableKeys\")]() {\n\t\tlet base = super[Symbol.for(\"can.getOwnEnumerableKeys\")]();\n\t\tlet keysSet = new Set([...Object.keys(this), ...base]);\n\t\treturn Array.from(keysSet);\n\t}\n}\n\nvar mutateMethods$1 = {\n\t\"push\": function(arr, args) {\n\t\treturn [{\n\t\t\tindex: arr.length - args.length,\n\t\t\tdeleteCount: 0,\n\t\t\tinsert: args,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"pop\": function(arr, args, oldLength) {\n\t\treturn [{\n\t\t\tindex: arr.length,\n\t\t\tdeleteCount: oldLength > 0 ? 1 : 0,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"shift\": function(arr, args, oldLength) {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: oldLength > 0 ? 1 : 0,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"unshift\": function(arr, args) {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: 0,\n\t\t\tinsert: args,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"splice\": function(arr, args, oldLength) {\n\t\tconst index = args[0] < 0 ?\n\t\t\tMath.max(oldLength + args[0], 0) :\n\t\t\tMath.min(oldLength, args[0]);\n\t\treturn [{\n\t\t\tindex,\n\t\t\tdeleteCount: Math.max(0, Math.min(args[1], oldLength - index)),\n\t\t\tinsert: args.slice(2),\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"sort\": function(arr) {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: arr.length,\n\t\t\tinsert: arr,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t},\n\t\"reverse\": function(arr) {\n\t\treturn [{\n\t\t\tindex: 0,\n\t\t\tdeleteCount: arr.length,\n\t\t\tinsert: arr,\n\t\t\ttype: \"splice\"\n\t\t}];\n\t}\n};\n\nconst convertArgs = {\n\t\"push\": function(arr, args) {\n\t\treturn convertItems(arr.constructor, args);\n\t},\n\t\"unshift\": function(arr, args) {\n\t\treturn convertItems(arr.constructor, args);\n\t},\n\t\"splice\": function(arr, args) {\n\t\treturn args.slice(0, 2).concat(convertItems(arr.constructor, args.slice(2)));\n\t}\n};\n\ncanReflect_1_19_2_canReflect.eachKey(mutateMethods$1, function(makePatches, prop) {\n\tconst protoFn = ObservableArray.prototype[prop];\n\tObservableArray.prototype[prop] = function() {\n\t\tconst oldLength = this.length;\n\t\tlet args = Array.from(arguments);\n\t\tif(convertArgs[prop]) {\n\t\t\targs = convertArgs[prop](this, args);\n\t\t}\n\n\t\t// prevent `length` event from being dispatched by get/set proxy hooks\n\t\tthis[metaSymbol$5].preventSideEffects = (this[metaSymbol$5].preventSideEffects || 0) + 1;\n\t\tconst result = protoFn.apply(this, args);\n\t\tthis[metaSymbol$5].preventSideEffects--;\n\n\t\tconst patches = makePatches(this, args, oldLength);\n\t\tdispatchLengthPatch.call(this, prop, patches, this.length, oldLength);\n\t\treturn result;\n\t};\n});\n\nmakeDefineInstanceKey$3(ObservableArray);\n\n// Export a constructor function to workaround an issue where ES2015 classes\n// cannot be extended in code that's transpiled by Babel.\nvar canObservableArray = canNamespace_1_0_0_canNamespace.ObservableArray = createConstructorFunction$2(\n\tObservableArray\n);\n\n//!steal-remove-start\nif(process.env.NODE_ENV !== 'production') {\n\tvar canLog = dev;\n\tvar canReflectDeps = canReflectDependencies_1_1_2_canReflectDependencies;\n}\n//!steal-remove-end\n\n// Symbols\nvar getChangesSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.getChangesDependencyRecord\");\nvar getValueSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.getValue\");\nvar onValueSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.onValue\");\nvar onEmitSymbol = canSymbol_1_7_0_canSymbol.for(\"can.onEmit\");\nvar offEmitSymbol = canSymbol_1_7_0_canSymbol.for(\"can.offEmit\");\nvar setValueSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.setValue\");\nvar canElementSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.element\");\n\n// Default implementations for setting the child and parent values\nfunction defaultSetValue(newValue, observable) {\n\tcanReflect_1_19_2_canReflect.setValue(observable, newValue);\n}\n\n// onEmit function\nfunction onEmit (listenToObservable, updateFunction, queue) {\n\treturn listenToObservable[onEmitSymbol](updateFunction, queue);\n}\n\n// offEmit function\nfunction offEmit (listenToObservable, updateFunction, queue) {\n\treturn listenToObservable[offEmitSymbol](updateFunction, queue);\n}\n\n// Given an observable, stop listening to it and tear down the mutation dependencies\nfunction turnOffListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {\n\tvar offValueOrOffEmitFn;\n\n\t// Use either offValue or offEmit depending on which Symbols are on the `observable`\n\tif (listenToObservable[onValueSymbol$2]) {\n\t\toffValueOrOffEmitFn = canReflect_1_19_2_canReflect.offValue;\n\t} else if (listenToObservable[onEmitSymbol]) {\n\t\toffValueOrOffEmitFn = offEmit;\n\t}\n\n\tif (offValueOrOffEmitFn) {\n\t\toffValueOrOffEmitFn(listenToObservable, updateFunction, queue);\n\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\n\t\t\t// The updateObservable is no longer mutated by listenToObservable\n\t\t\tcanReflectDeps.deleteMutatedBy(updateObservable, listenToObservable);\n\n\t\t\t// The updateFunction no longer mutates anything\n\t\t\tupdateFunction[getChangesSymbol$2] = function getChangesDependencyRecord() {\n\t\t\t};\n\n\t\t}\n\t\t//!steal-remove-end\n\t}\n}\n\n// Given an observable, start listening to it and set up the mutation dependencies\nfunction turnOnListeningAndUpdate(listenToObservable, updateObservable, updateFunction, queue) {\n\tvar onValueOrOnEmitFn;\n\n\t// Use either onValue or onEmit depending on which Symbols are on the `observable`\n\tif (listenToObservable[onValueSymbol$2]) {\n\t\tonValueOrOnEmitFn = canReflect_1_19_2_canReflect.onValue;\n\t} else if (listenToObservable[onEmitSymbol]) {\n\t\tonValueOrOnEmitFn = onEmit;\n\t}\n\n\tif (onValueOrOnEmitFn) {\n\t\tonValueOrOnEmitFn(listenToObservable, updateFunction, queue);\n\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\n\t\t\t// The updateObservable is mutated by listenToObservable\n\t\t\tcanReflectDeps.addMutatedBy(updateObservable, listenToObservable);\n\n\t\t\t// The updateFunction mutates updateObservable\n\t\t\tupdateFunction[getChangesSymbol$2] = function getChangesDependencyRecord() {\n\t\t\t\tvar s = new Set();\n\t\t\t\ts.add(updateObservable);\n\t\t\t\treturn {\n\t\t\t\t\tvalueDependencies: s\n\t\t\t\t};\n\t\t\t};\n\n\t\t}\n\n\t\t//!steal-remove-end\n\t}\n}\n\n// Semaphores are used to keep track of updates to the child & parent\n// For debugging purposes, Semaphore and Bind are highly coupled.\nfunction Semaphore(binding, type) {\n\tthis.value = 0;\n\tthis._binding = binding;\n\tthis._type = type;\n}\ncanAssign_1_3_3_canAssign(Semaphore.prototype, {\n\tdecrement: function() {\n\t\tthis.value -= 1;\n\t},\n\tincrement: function(args) {\n\t\tthis._incremented = true;\n\t\tthis.value += 1;\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tif(this.value === 1) {\n\t\t\t\tthis._binding._debugSemaphores = [];\n\t\t\t}\n\t\t\tvar semaphoreData = {\n\t\t\t\ttype: this._type,\n\t\t\t\taction: \"increment\",\n\t\t\t\tobservable: args.observable,\n\t\t\t\tnewValue: args.newValue,\n\t\t\t\tvalue: this.value,\n\t\t\t\tlastTask: canQueues_1_3_2_canQueues.lastTask()\n\t\t\t};\n\t\t\tthis._binding._debugSemaphores.push(semaphoreData);\n\t\t}\n\t\t//!steal-remove-end\n\t}\n});\n\nfunction Bind(options) {\n\tthis._options = options;\n\n\t// These parameters must be supplied\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tif (options.child === undefined) {\n\t\t\tthrow new TypeError(\"You must supply a child\");\n\t\t}\n\t\tif (options.parent === undefined) {\n\t\t\tthrow new TypeError(\"You must supply a parent\");\n\t\t}\n\t\tif (options.queue && [\"notify\", \"derive\", \"domUI\",\"dom\"].indexOf(options.queue) === -1) {\n\t\t\tthrow new RangeError(\"Invalid queue; must be one of notify, derive, dom, or domUI\");\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\t// queue; by default, domUI\n\tif (options.queue === undefined) {\n\t\tif(options.element) {\n\t\t\toptions.queue = \"dom\";\n\t\t} else {\n\t\t\toptions.queue = \"domUI\";\n\t\t}\n\n\t}\n\n\t// cycles: when an observable is set in a two-way binding, it can update the\n\t// other bound observable, which can then update the original observable the\n\t// “cycles” number of times. For example, a child is set and updates the parent;\n\t// with cycles: 0, the parent could not update the child;\n\t// with cycles: 1, the parent could update the child, which can update the parent\n\t// with cycles: 2, the parent can update the child again, and so on and so forth…\n\tif (options.cycles > 0 === false) {\n\t\toptions.cycles = 0;\n\t}\n\n\t// onInitDoNotUpdateChild is false by default\n\toptions.onInitDoNotUpdateChild =\n\t\ttypeof options.onInitDoNotUpdateChild === \"boolean\" ?\n\t\t\toptions.onInitDoNotUpdateChild\n\t\t\t: false;\n\n\t// onInitDoNotUpdateParent is false by default\n\toptions.onInitDoNotUpdateParent =\n\t\ttypeof options.onInitDoNotUpdateParent === \"boolean\" ?\n\t\t\toptions.onInitDoNotUpdateParent\n\t\t\t: false;\n\n\t// onInitSetUndefinedParentIfChildIsDefined is true by default\n\toptions.onInitSetUndefinedParentIfChildIsDefined =\n\t\ttypeof options.onInitSetUndefinedParentIfChildIsDefined === \"boolean\" ?\n\t\t\toptions.onInitSetUndefinedParentIfChildIsDefined\n\t\t\t: true;\n\n\t// The way the cycles are tracked is through semaphores; currently, when\n\t// either the child or parent is updated, we increase their respective\n\t// semaphore so that if it’s two-way binding, then the “other” observable\n\t// will only update if the total count for both semaphores is less than or\n\t// equal to twice the number of cycles (because a cycle means two updates).\n\tvar childSemaphore = new Semaphore(this,\"child\");\n\tvar parentSemaphore = new Semaphore(this,\"parent\");\n\n\t// Determine if this is a one-way or two-way binding; by default, accept\n\t// whatever options are passed in, but if they’re not defined, then check for\n\t// the getValue and setValue symbols on the child and parent values.\n\tvar childToParent = true;\n\tif (typeof options.childToParent === \"boolean\") {\n\t\t// Always let the option override any checks\n\t\tchildToParent = options.childToParent;\n\t} else if (options.child[getValueSymbol$1] == null) {\n\t\t// Child to parent won’t work if we can’t get the child’s value\n\t\tchildToParent = false;\n\t} else if (options.setParent === undefined && options.parent[setValueSymbol$2] == null) {\n\t\t// Child to parent won’t work if we can’t set the parent’s value\n\t\tchildToParent = false;\n\t}\n\tvar parentToChild = true;\n\tif (typeof options.parentToChild === \"boolean\") {\n\t\t// Always let the option override any checks\n\t\tparentToChild = options.parentToChild;\n\t} else if (options.parent[getValueSymbol$1] == null) {\n\t\t// Parent to child won’t work if we can’t get the parent’s value\n\t\tparentToChild = false;\n\t} else if (options.setChild === undefined && options.child[setValueSymbol$2] == null) {\n\t\t// Parent to child won’t work if we can’t set the child’s value\n\t\tparentToChild = false;\n\t}\n\tif (childToParent === false && parentToChild === false) {\n\t\tthrow new Error(\"Neither the child nor parent will be updated; this is a no-way binding\");\n\t}\n\tthis._childToParent = childToParent;\n\tthis._parentToChild = parentToChild;\n\n\t// Custom child & parent setters can be supplied; if they aren’t provided,\n\t// then create our own.\n\tif (options.setChild === undefined) {\n\t\toptions.setChild = defaultSetValue;\n\t}\n\tif (options.setParent === undefined) {\n\t\toptions.setParent = defaultSetValue;\n\t}\n\n\t// Set the observables’ priority\n\tif (options.priority !== undefined) {\n\t\tcanReflect_1_19_2_canReflect.setPriority(options.child, options.priority);\n\t\tcanReflect_1_19_2_canReflect.setPriority(options.parent, options.priority);\n\t}\n\n\t// These variables keep track of how many updates are allowed in a cycle.\n\t// cycles is multipled by two because one update is allowed for each side of\n\t// the binding, child and parent. One more update is allowed depending on the\n\t// sticky option; if it’s sticky, then one more update needs to be allowed.\n\tvar allowedUpdates = options.cycles * 2;\n\tvar allowedChildUpdates = allowedUpdates + (options.sticky === \"childSticksToParent\" ? 1 : 0);\n\tvar allowedParentUpdates = allowedUpdates + (options.sticky === \"parentSticksToChild\" ? 1 : 0);\n\n\t// This keeps track of whether we’re bound to the child and/or parent; this\n\t// allows startParent() to be called first and on() can be called later to\n\t// finish setting up the child binding. This is also checked when updating\n\t// values; if stop() has been called but updateValue() is called, then we\n\t// ignore the update.\n\tthis._bindingState = {\n\t\tchild: false,\n\t\tparent: false\n\t};\n\n\t// This is the listener that’s called when the parent changes\n\tthis._updateChild = function(newValue) {\n\t\tupdateValue.call(this, {\n\t\t\tbindingState: this._bindingState,\n\t\t\tnewValue: newValue,\n\n\t\t\t// Some options used for debugging\n\t\t\tdebugObservableName: \"child\",\n\t\t\tdebugPartnerName: \"parent\",\n\n\t\t\t// Main observable values\n\t\t\tobservable: options.child,\n\t\t\tsetValue: options.setChild,\n\t\t\tsemaphore: childSemaphore,\n\n\t\t\t// If the sum of the semaphores is less than or equal to this number, then\n\t\t\t// it’s ok to update the child with the new value.\n\t\t\tallowedUpdates: allowedChildUpdates,\n\n\t\t\t// If options.sticky === \"parentSticksToChild\", then after the parent sets\n\t\t\t// the child, check to see if the child matches the parent; if not, then\n\t\t\t// set the parent to the child’s value. This is used in cases where the\n\t\t\t// child modifies its own value and the parent should be kept in sync with\n\t\t\t// the child.\n\t\t\tsticky: options.sticky === \"parentSticksToChild\",\n\n\t\t\t// Partner observable values\n\t\t\tpartner: options.parent,\n\t\t\tsetPartner: options.setParent,\n\t\t\tpartnerSemaphore: parentSemaphore\n\t\t});\n\t}.bind(this);\n\n\t// This is the listener that’s called when the child changes\n\tthis._updateParent = function(newValue) {\n\t\tupdateValue.call(this, {\n\t\t\tbindingState: this._bindingState,\n\t\t\tnewValue: newValue,\n\n\t\t\t// Some options used for debugging\n\t\t\tdebugObservableName: \"parent\",\n\t\t\tdebugPartnerName: \"child\",\n\n\t\t\t// Main observable values\n\t\t\tobservable: options.parent,\n\t\t\tsetValue: options.setParent,\n\t\t\tsemaphore: parentSemaphore,\n\n\t\t\t// If the sum of the semaphores is less than or equal to this number, then\n\t\t\t// it’s ok to update the parent with the new value.\n\t\t\tallowedUpdates: allowedParentUpdates,\n\n\t\t\t// If options.sticky === \"childSticksToParent\", then after the child sets\n\t\t\t// the parent, check to see if the parent matches the child; if not, then\n\t\t\t// set the child to the parent’s value. This is used in cases where the\n\t\t\t// parent modifies its own value and the child should be kept in sync with\n\t\t\t// the parent.\n\t\t\tsticky: options.sticky === \"childSticksToParent\",\n\n\t\t\t// Partner observable values\n\t\t\tpartner: options.child,\n\t\t\tsetPartner: options.setChild,\n\t\t\tpartnerSemaphore: childSemaphore\n\t\t});\n\t}.bind(this);\n\n\tif(options.element) {\n\t\tthis._updateChild[canElementSymbol$1] = this._updateParent[canElementSymbol$1] = options.element;\n\t}\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\n\t\tObject.defineProperty(this._updateChild, \"name\", {\n\t\t\tvalue: options.updateChildName ? options.updateChildName : \"update \"+canReflect_1_19_2_canReflect.getName(options.child),\n\t\t\tconfigurable: true\n\t\t});\n\n\t\tObject.defineProperty(this._updateParent, \"name\", {\n\t\t\tvalue: options.updateParentName ? options.updateParentName : \"update \"+canReflect_1_19_2_canReflect.getName(options.parent),\n\t\t\tconfigurable: true\n\t\t});\n\t}\n\t//!steal-remove-end\n\n}\n\nObject.defineProperty(Bind.prototype, \"parentValue\", {\n\tget: function() {\n\t\treturn canReflect_1_19_2_canReflect.getValue(this._options.parent);\n\t}\n});\n\ncanAssign_1_3_3_canAssign(Bind.prototype, {\n\n\t// Turn on any bindings that haven’t already been enabled;\n\t// also update the child or parent if need be.\n\tstart: function() {\n\t\tvar childValue;\n\t\tvar options = this._options;\n\t\tvar parentValue;\n\n\t\t// The tests don’t show that it matters which is bound first, but we’ll\n\t\t// bind to the parent first to stay consistent with how\n\t\t// can-stache-bindings did things.\n\t\tthis.startParent();\n\t\tthis.startChild();\n\n\t\t// Initialize the child & parent values\n\t\tif (this._childToParent === true && this._parentToChild === true) {\n\t\t\t// Two-way binding\n\t\t\tparentValue = canReflect_1_19_2_canReflect.getValue(options.parent);\n\t\t\tif (parentValue === undefined) {\n\t\t\t\tchildValue = canReflect_1_19_2_canReflect.getValue(options.child);\n\t\t\t\tif (childValue === undefined) {\n\t\t\t\t\t// Check if updating the child is allowed\n\t\t\t\t\tif (options.onInitDoNotUpdateChild === false) {\n\t\t\t\t\t\tthis._updateChild(parentValue);\n\t\t\t\t\t}\n\t\t\t\t} else if (options.onInitDoNotUpdateParent === false && options.onInitSetUndefinedParentIfChildIsDefined === true) {\n\t\t\t\t\tthis._updateParent(childValue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Check if updating the child is allowed\n\t\t\t\tif (options.onInitDoNotUpdateChild === false) {\n\t\t\t\t\tthis._updateChild(parentValue);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production'){\n\t\t\t\t// Here we want to do a dev-mode check to see whether the child does type conversions on\n\t\t\t\t// any two-way bindings. This will be ignored and the child and parent will be desynched.\n\t\t\t\tvar parentContext = options.parent.observation && options.parent.observation.func || options.parent;\n\t\t\t\tvar childContext = options.child.observation && options.child.observation.func || options.child;\n\t\t\t\tparentValue = canReflect_1_19_2_canReflect.getValue(options.parent);\n\t\t\t\tchildValue = canReflect_1_19_2_canReflect.getValue(options.child);\n\t\t\t\tif (options.sticky && childValue !== parentValue) {\n\t\t\t\t\tcanLog.warn(\n\t\t\t\t\t\t\"can-bind: The \" +\n\t\t\t\t\t\t(options.sticky === \"parentSticksToChild\" ? \"parent\" : \"child\") +\n\t\t\t\t\t\t\" of the sticky two-way binding \" +\n\t\t\t\t\t\t(options.debugName || (canReflect_1_19_2_canReflect.getName(parentContext) + \"<->\" + canReflect_1_19_2_canReflect.getName(childContext))) +\n\t\t\t\t\t\t\" is changing or converting its value when set. Conversions should only be done on the binding \" +\n\t\t\t\t\t\t(options.sticky === \"parentSticksToChild\" ? \"child\" : \"parent\") +\n\t\t\t\t\t\t\" to preserve synchronization. \" +\n\t\t\t\t\t\t\"See https://canjs.com/doc/can-stache-bindings.html#StickyBindings for more about sticky bindings\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t} else if (this._childToParent === true) {\n\t\t\t// One-way child -> parent, so update the parent\n\t\t\t// Check if we are to initialize the parent\n\t\t\tif (options.onInitDoNotUpdateParent === false) {\n\t\t\t\tchildValue = canReflect_1_19_2_canReflect.getValue(options.child);\n\t\t\t\tthis._updateParent(childValue);\n\t\t\t}\n\n\t\t} else if (this._parentToChild === true) {\n\t\t\t// One-way parent -> child, so update the child\n\t\t\t// Check if updating the child is allowed\n\t\t\tif (options.onInitDoNotUpdateChild === false) {\n\t\t\t\tparentValue = canReflect_1_19_2_canReflect.getValue(options.parent);\n\t\t\t\tthis._updateChild(parentValue);\n\t\t\t}\n\t\t}\n\t},\n\n\t// Listen for changes to the child observable and update the parent\n\tstartChild: function() {\n\t\tif (this._bindingState.child === false && this._childToParent === true) {\n\t\t\tvar options = this._options;\n\t\t\tthis._bindingState.child = true;\n\t\t\tturnOnListeningAndUpdate(options.child, options.parent, this._updateParent, options.queue);\n\t\t}\n\t},\n\n\t// Listen for changes to the parent observable and update the child\n\tstartParent: function() {\n\t\tif (this._bindingState.parent === false && this._parentToChild === true) {\n\t\t\tvar options = this._options;\n\t\t\tthis._bindingState.parent = true;\n\t\t\tturnOnListeningAndUpdate(options.parent, options.child, this._updateChild, options.queue);\n\t\t}\n\t},\n\n\t// Turn off all the bindings\n\tstop: function() {\n\t\tvar bindingState = this._bindingState;\n\t\tvar options = this._options;\n\n\t\t// Turn off the parent listener\n\t\tif (bindingState.parent === true && this._parentToChild === true) {\n\t\t\tbindingState.parent = false;\n\t\t\tturnOffListeningAndUpdate(options.parent, options.child, this._updateChild, options.queue);\n\t\t}\n\n\t\t// Turn off the child listener\n\t\tif (bindingState.child === true && this._childToParent === true) {\n\t\t\tbindingState.child = false;\n\t\t\tturnOffListeningAndUpdate(options.child, options.parent, this._updateParent, options.queue);\n\t\t}\n\t}\n\n});\n\n[\"parent\", \"child\"].forEach(function(property){\n\tObject.defineProperty(Bind.prototype, property, {\n\t\tget: function(){\n\t\t\treturn this._options[property];\n\t\t}\n\t});\n});\n\n\n\n// updateValue is a helper function that’s used by updateChild and updateParent\nfunction updateValue(args) {\n\t/* jshint validthis: true */\n\t// Check to see whether the binding is active; ignore updates if it isn’t active\n\tvar bindingState = args.bindingState;\n\tif (bindingState.child === false && bindingState.parent === false) {\n\t\t// We don’t warn the user about this because it’s a common occurrence in\n\t\t// can-stache-bindings, e.g. {{#if value}}{{/if}}\n\t\treturn;\n\t}\n\n\t// Now check the semaphore; if this change is happening because the partner\n\t// observable was just updated, we only want to update this observable again\n\t// if the total count for both semaphores is less than or equal to the number\n\t// of allowed updates.\n\tvar semaphore = args.semaphore;\n\tif ((semaphore.value + args.partnerSemaphore.value) <= args.allowedUpdates) {\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\n\t\t// Increase the semaphore so that when the batch ends, if an update to the\n\t\t// partner observable’s value is made, then it won’t update this observable\n\t\t// again unless cycles are allowed.\n\t\tsemaphore.increment(args);\n\n\t\t// Update the observable’s value; this uses either a custom function passed\n\t\t// in when the binding was initialized or canReflect.setValue.\n\t\targs.setValue(args.newValue, args.observable);\n\n\n\n\t\t// Decrease the semaphore after all other updates have occurred\n\t\tcanQueues_1_3_2_canQueues.mutateQueue.enqueue(semaphore.decrement, semaphore, []);\n\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\n\t\t// Stickiness is used in cases where the call to args.setValue above might\n\t\t// have resulted in the observable being set to a different value than what\n\t\t// was passed into this function (args.newValue). If sticky:true, then set\n\t\t// the partner observable’s value so they’re kept in sync.\n\t\tif (args.sticky) {\n\t\t\tvar observableValue = canReflect_1_19_2_canReflect.getValue(args.observable);\n\t\t\tif (observableValue !== canReflect_1_19_2_canReflect.getValue(args.partner)) {\n\t\t\t\targs.setPartner(observableValue, args.partner);\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t// It’s natural for this “else” block to be hit in two-way bindings; as an\n\t\t// example, if a parent gets set and the child gets updated, the child’s\n\t\t// listener to update the parent will be called, but it’ll be ignored if we\n\t\t// don’t want cycles. HOWEVER, if this gets called and the parent is not the\n\t\t// same value as the child, then their values are going to be out of sync,\n\t\t// probably unintentionally. This is worth pointing out to developers\n\t\t// because it can cause unexpected behavior… some people call those bugs. :)\n\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production'){\n\t\t\tvar currentValue = canReflect_1_19_2_canReflect.getValue(args.observable);\n\t\t\tif (currentValue !== args.newValue) {\n\t\t\t\tvar warningParts = [\n\t\t\t\t\t\"can-bind: attempting to update \" + args.debugObservableName + \" \" + canReflect_1_19_2_canReflect.getName(args.observable) + \" to new value: %o\",\n\t\t\t\t\t\"…but the \" + args.debugObservableName + \" semaphore is at \" + semaphore.value + \" and the \" + args.debugPartnerName + \" semaphore is at \" + args.partnerSemaphore.value + \". The number of allowed updates is \" + args.allowedUpdates + \".\",\n\t\t\t\t\t\"The \" + args.debugObservableName + \" value will remain unchanged; it’s currently: %o. \",\n\t\t\t\t\t\"Read https://canjs.com/doc/can-bind.html#Warnings for more information. Printing mutation history:\"\n\t\t\t\t];\n\t\t\t\tcanLog.warn(warningParts.join(\"\\n\"), args.newValue, currentValue);\n\t\t\t\tif(console.groupCollapsed) {\n\t\t\t\t\t// stores the last stack we've seen so we only need to show what's happened since the\n\t\t\t\t\t// last increment.\n\t\t\t\t\tvar lastStack = [];\n\t\t\t\t\tvar getFromLastStack = function(stack){\n\t\t\t\t\t\tif(lastStack.length) {\n\t\t\t\t\t\t\t// walk backwards\n\t\t\t\t\t\t\tfor(var i = lastStack.length - 1; i >= 0 ; i--) {\n\t\t\t\t\t\t\t\tvar index = stack.indexOf(lastStack[i]);\n\t\t\t\t\t\t\t\tif(index !== - 1) {\n\t\t\t\t\t\t\t\t\treturn stack.slice(i+1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn stack;\n\t\t\t\t\t};\n\t\t\t\t\t// Loop through all the debug information\n\t\t\t\t\t// And print out what caused increments.\n\t\t\t\t\tthis._debugSemaphores.forEach(function(semaphoreMutation){\n\t\t\t\t\t\tif(semaphoreMutation.action === \"increment\") {\n\t\t\t\t\t\t\tconsole.groupCollapsed(semaphoreMutation.type+\" \"+canReflect_1_19_2_canReflect.getName(semaphoreMutation.observable)+\" set.\");\n\t\t\t\t\t\t\tvar stack = canQueues_1_3_2_canQueues.stack(semaphoreMutation.lastTask);\n\t\t\t\t\t\t\tvar printStack = getFromLastStack(stack);\n\t\t\t\t\t\t\tlastStack = stack;\n\t\t\t\t\t\t\t// This steals how `logStack` logs information.\n\t\t\t\t\t\t\tcanQueues_1_3_2_canQueues.logStack.call({\n\t\t\t\t\t\t\t\tstack: function(){\n\t\t\t\t\t\t\t\t\treturn printStack;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tconsole.log(semaphoreMutation.type+ \" semaphore incremented to \"+semaphoreMutation.value+\".\");\n\t\t\t\t\t\t\tconsole.log(canReflect_1_19_2_canReflect.getName(semaphoreMutation.observable),semaphoreMutation.observable,\"set to \", semaphoreMutation.newValue);\n\t\t\t\t\t\t\tconsole.groupEnd();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tconsole.groupCollapsed(args.debugObservableName+\" \"+canReflect_1_19_2_canReflect.getName(args.observable)+\" NOT set.\");\n\t\t\t\t\tvar stack = getFromLastStack(canQueues_1_3_2_canQueues.stack());\n\t\t\t\t\tcanQueues_1_3_2_canQueues.logStack.call({\n\t\t\t\t\t\tstack: function(){\n\t\t\t\t\t\t\treturn stack;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tconsole.log(args.debugObservableName+\" semaphore (\"+semaphore.value+\n\t\t\t\t\t \") + \"+args.debugPartnerName+\" semaphore (\"+args.partnerSemaphore.value+ \") IS NOT <= allowed updates (\"+\n\t\t\t\t\t args.allowedUpdates+\")\");\n\t\t\t\t\tconsole.log(\"Prevented from setting \"+canReflect_1_19_2_canReflect.getName(args.observable), args.observable, \"to\", args.newValue);\n\t\t\t\t\tconsole.groupEnd();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\t}\n}\n\nvar canBind_1_5_1_canBind = canNamespace_1_0_0_canNamespace.Bind = Bind;\n\nconst value$1 = canValue_1_1_2_canValue;\n\n\n\n\n\n//!steal-remove-start\nif(process.env.NODE_ENV !== 'production') {\n\tvar Observation$1 = canObservation_4_2_0_canObservation;\n}\n//!steal-remove-end\n\nconst metaSymbol$6 = Symbol.for(\"can.meta\");\n\nfunction isJSONLike (obj) {\n\treturn (canReflect_1_19_2_canReflect.isFunctionLike(obj.parse) &&\n\t\t\tcanReflect_1_19_2_canReflect.isFunctionLike(obj.stringify));\n}\n\nfunction initializeFromAttribute (propertyName, ctr, converter, attributeName) {\n\tif (ctr[metaSymbol$6] === undefined) {\n\t\tctr[metaSymbol$6] = {};\n\t}\n\t// Create array for all attributes we want to listen to change events for\n\tif (ctr[metaSymbol$6]._observedAttributes === undefined) {\n\t\tctr[metaSymbol$6]._observedAttributes = [];\n\t}\n\t// Create object for attributeChangedCallback for each prop\n\tif (ctr[metaSymbol$6]._attributeChangedCallbackHandler === undefined) {\n\t\tctr[metaSymbol$6]._attributeChangedCallbackHandler = {};\n\t}\n\n\tif (attributeName === undefined) {\n\t\tattributeName = propertyName;\n\t}\n\t// Ensure the attributeName is hyphen case\n\tattributeName = canString_1_1_0_canString.hyphenate(attributeName);\n\n\t// Modify the class prototype here\n\tif (!ctr[metaSymbol$6]._hasInitializedAttributeBindings) {\n\t\t// Set up the static getter for `observedAttributes`\n\t\tObject.defineProperty(ctr, \"observedAttributes\", {\n\t\t\tget() {\n\t\t\t\treturn ctr[metaSymbol$6]._observedAttributes;\n\t\t\t}\n\t\t});\n\n\t\tctr.prototype.attributeChangedCallback = function (prop) {\n\t\t\tctr[metaSymbol$6]._attributeChangedCallbackHandler[prop].apply(this, arguments);\n\t\t};\n\n\t\tctr[metaSymbol$6]._hasInitializedAttributeBindings = true;\n\t}\n\t// Push into `_observedAttributes` for `observedAttributes` getter\n\tctr[metaSymbol$6]._observedAttributes.push(attributeName);\n\n\t// Create the attributeChangedCallback handler\n\tctr[metaSymbol$6]._attributeChangedCallbackHandler[attributeName] = function (prop, oldVal, newVal) {\n\t\tif (this[metaSymbol$6] && this[metaSymbol$6]._attributeBindings && newVal !== oldVal) {\n\t\t\tcanReflect_1_19_2_canReflect.setValue(this[metaSymbol$6]._attributeBindings[prop], newVal);\n\t\t}\n\t};\n\n\tvar lazyGetType = function() {\n\t\tvar Type;\n\t\tvar schema = canReflect_1_19_2_canReflect.getSchema(ctr);\n\t\tif(schema) {\n\t\t\tType = schema.keys[propertyName];\n\t\t}\n\t\tif(!Type) {\n\t\t\tType = canType_1_1_6_canType.Any;\n\t\t}\n\t\tType = canType_1_1_6_canType.convert(Type);\n\t\tlazyGetType = function() { return Type; };\n\t\treturn Type;\n\t};\n\tfunction convertToValue(value) {\n\t\tif (converter) {\n\t\t\tvalue = converter.parse(value);\n\t\t}\n\t\treturn canReflect_1_19_2_canReflect.convert(value, lazyGetType());\n\t}\n\n\treturn function fromAttributeBind (instance) {\n\t\t// Child binding used by `attributeChangedCallback` to update the value when an attribute change occurs\n\t\tconst childValue = value$1.to(instance, propertyName);\n\t\tconst intermediateValue = {};\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(intermediateValue, {\n\t\t\t\"can.setValue\": function(value) {\n\t\t\t\tcanReflect_1_19_2_canReflect.setValue(childValue, convertToValue(value) );\n\t\t\t}\n\t\t});\n\t\tconst parentValue = value$1.from(instance.hasAttribute(attributeName) ? convertToValue(instance.getAttribute(attributeName)) : undefined);\n\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t// Ensure pretty names for dep graph\n\t\t\tcanReflect_1_19_2_canReflect.assignSymbols(parentValue, {\n\t\t\t\t\"can.getName\": function getName() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\"FromAttribute<\" +\n\t\t\t\t\t\tinstance.nodeName.toLowerCase() +\n\t\t\t\t\t\t\".\" +\n\t\t\t\t\t\tattributeName +\n\t\t\t\t\t\t\">\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t\tcanReflect_1_19_2_canReflect.assignSymbols(childValue, {\n\t\t\t\t\"can.getName\": function getName() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\"Observation<\" +\n\t\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(parentValue) +\n\t\t\t\t\t\t\">\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// Create temporary binding to initialize dep graph\n\t\t\tObservation$1.temporarilyBind(childValue);\n\t\t}\n\t\t//!steal-remove-end\n\t\tconst bind = new canBind_1_5_1_canBind({\n\t\t\tparent: parentValue,\n\t\t\tchild: intermediateValue,\n\t\t\tqueue: \"dom\",\n\t\t\t// During initialization prevent update of child\n\t\t\tonInitDoNotUpdateChild: true\n\t\t});\n\n\t\tif (instance[metaSymbol$6] === undefined) {\n\t\t\tinstance[metaSymbol$6] = {};\n\t\t}\n\t\tif (instance[metaSymbol$6]._attributeBindings === undefined) {\n\t\t\tinstance[metaSymbol$6]._attributeBindings = {};\n\t\t}\n\n\t\t// Push binding so it can be used within `attributeChangedCallback`\n\t\tinstance[metaSymbol$6]._attributeBindings[attributeName] = intermediateValue;\n\n\t\treturn bind;\n\t};\n}\n\nvar canObservableBindings_1_3_3_fromAttribute = function fromAttribute (attributeName, ctr) {\n\tvar converter;\n\t// Handle the class constructor\n\tif (arguments.length === 2 && canReflect_1_19_2_canReflect.isConstructorLike(ctr) && !isJSONLike(ctr)) {\n\t\treturn initializeFromAttribute(attributeName, ctr);\n\t} else if (arguments.length === 1 && typeof attributeName === 'object') {\n\t\t// Handle fromAttribute(JSON)\n\t\tconverter = attributeName;\n\t\tattributeName = undefined;\n\t} else if (typeof ctr === 'object' && isJSONLike(ctr)) {\n\t\t// Handle the case where an attribute name\n\t\t// and JSON like converter is passed\n\t\t// fromAttribute('attr', JSON)\n\t\tconverter = ctr;\n\t}\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tif (converter && !isJSONLike(converter)) {\n\t\t\tthrow new Error('The passed converter object is wrong! The object must have \"parse\" and \"stringify\" methods!');\n\t\t}\n\t}\n\t//!steal-remove-end\n\treturn function (propertyName, ctr) {\n\t\treturn initializeFromAttribute(propertyName, ctr, converter, attributeName);\n\t};\n};\n\nvar setElementSymbol = canSymbol_1_7_0_canSymbol.for(\"can.setElement\");\n\n// SetterObservable's call a function when set. Their getter is backed up by an\n// observation.\nfunction SetterObservable(getter, setter) {\n\tthis.setter = setter;\n\tthis.observation = new canObservation_4_2_0_canObservation(getter);\n\tthis.handler = this.handler.bind(this);\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(this, {\n\t\t\t\"can.getName\": function() {\n\t\t\t\treturn (\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(this.constructor) +\n\t\t\t\t\t\"<\" +\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getName(getter) +\n\t\t\t\t\t\">\"\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(this.handler, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this) + \".handler\"\n\t\t});\n\t}\n\t//!steal-remove-end\n}\n\nSetterObservable.prototype = Object.create(settable.prototype);\nSetterObservable.prototype.constructor = SetterObservable;\nSetterObservable.prototype.set = function(newVal) {\n\tthis.setter(newVal);\n};\nSetterObservable.prototype.hasDependencies = function() {\n\treturn canReflect_1_19_2_canReflect.valueHasDependencies(this.observation);\n};\ncanReflect_1_19_2_canReflect.assignSymbols(SetterObservable.prototype, {\n\t\"can.setValue\": SetterObservable.prototype.set,\n\t\"can.valueHasDependencies\": SetterObservable.prototype.hasDependencies,\n\t\"can.setElement\": function(el) {\n\t\tthis.observation[setElementSymbol](el);\n\t}\n});\n\nvar setter = SetterObservable;\n\nconst lifecycleStatusSymbol = Symbol.for(\"can.lifecycleStatus\");\nconst inSetupSymbol$4 = Symbol.for(\"can.initializing\");\nconst teardownHandlersSymbol = Symbol.for(\"can.teardownHandlers\");\n\nfunction defineConfigurableNonEnumerable(obj, prop, value) {\n\tObject.defineProperty(obj, prop, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue: value\n\t});\n}\n\nvar mixinLifecycleMethods = function mixinLifecycleMethods(BaseElement = HTMLElement) {\n\treturn class LifecycleElement extends BaseElement {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tif (arguments.length) {\n\t\t\t\tthrow new Error(\"can-stache-element: Do not pass arguments to the constructor. Initial property values should be passed to the `initialize` hook.\");\n\t\t\t}\n\n\t\t\t// add inSetup symbol to prevent events being dispatched\n\t\t\tdefineConfigurableNonEnumerable(this, inSetupSymbol$4, true);\n\n\t\t\t// add lifecycle status symbol\n\t\t\tdefineConfigurableNonEnumerable(this, lifecycleStatusSymbol, {\n\t\t\t\tinitialized: false,\n\t\t\t\trendered: false,\n\t\t\t\tconnected: false,\n\t\t\t\tdisconnected: false\n\t\t\t});\n\n\t\t\t// add a place to store additional teardownHandlers\n\t\t\tdefineConfigurableNonEnumerable(this, teardownHandlersSymbol, []);\n\t\t}\n\n\t\t// custom element lifecycle methods\n\t\tconnectedCallback(props) {\n\t\t\tthis.initialize(props);\n\t\t\tthis.render();\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.disconnect();\n\t\t\treturn this;\n\t\t}\n\n\t\t// custom lifecycle methods\n\t\tinitialize(props) {\n\t\t\tconst lifecycleStatus = this[lifecycleStatusSymbol];\n\n\t\t\tif (lifecycleStatus.initialized) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// Overwrite ... this means that this initialize\n\t\t\t// can't be inherited (super.initialize).\n\t\t\tthis[inSetupSymbol$4] = true;\n\n\t\t\tif (super.initialize) {\n\t\t\t\tsuper.initialize(props);\n\t\t\t}\n\n\t\t\tthis[inSetupSymbol$4] = false;\n\n\t\t\tlifecycleStatus.initialized = true;\n\n\t\t\treturn this;\n\t\t}\n\n\t\trender(props) {\n\t\t\tconst lifecycleStatus = this[lifecycleStatusSymbol];\n\n\t\t\tif (lifecycleStatus.rendered) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (!lifecycleStatus.initialized) {\n\t\t\t\tthis.initialize(props);\n\t\t\t}\n\n\t\t\tif (super.render) {\n\t\t\t\tsuper.render(props);\n\t\t\t}\n\n\t\t\tlifecycleStatus.rendered = true;\n\n\t\t\treturn this;\n\t\t}\n\n\t\tconnect(props) {\n\t\t\tconst lifecycleStatus = this[lifecycleStatusSymbol];\n\n\t\t\tif (lifecycleStatus.connected) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (!lifecycleStatus.initialized) {\n\t\t\t\tthis.initialize(props);\n\t\t\t}\n\n\t\t\tif (!lifecycleStatus.rendered) {\n\t\t\t\tthis.render(props);\n\t\t\t}\n\n\t\t\tif (super.connect) {\n\t\t\t\tsuper.connect(props);\n\t\t\t}\n\n\t\t\tif (this.connected) {\n\t\t\t\tlet connectedTeardown = this.connected();\n\t\t\t\tif (typeof connectedTeardown === \"function\") {\n\t\t\t\t\tthis[teardownHandlersSymbol].push(connectedTeardown);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlifecycleStatus.connected = true;\n\t\t\tlifecycleStatus.disconnected = false;\n\n\t\t\treturn this;\n\t\t}\n\n\t\tdisconnect() {\n\t\t\tconst lifecycleStatus = this[lifecycleStatusSymbol];\n\n\t\t\tif (lifecycleStatus.disconnected) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (super.disconnect) {\n\t\t\t\tsuper.disconnect();\n\t\t\t}\n\n\t\t\tif (this.stopListening) {\n\t\t\t\tthis.stopListening();\n\t\t\t}\n\n\t\t\tfor (let handler of this[teardownHandlersSymbol]) {\n\t\t\t\thandler.call(this);\n\t\t\t}\n\n\t\t\tif (this.disconnected) {\n\t\t\t\tthis.disconnected();\n\t\t\t}\n\n\t\t\tthis[lifecycleStatusSymbol] = {\n\t\t\t\tinitialized: false,\n\t\t\t\trendered: false,\n\t\t\t\tconnected: false,\n\t\t\t\tdisconnected: true\n\t\t\t};\n\n\t\t\treturn this;\n\t\t}\n\t};\n};\n\nconst { mixinElement: mixinElement$1, mixins: mixins$5 } = mixins;\n\n\nconst eventTargetInstalledSymbol = Symbol.for(\"can.eventTargetInstalled\");\n\nvar mixinProps = function mixinDefine(Base = HTMLElement) {\n\tconst realAddEventListener = Base.prototype.addEventListener;\n\tconst realRemoveEventListener = Base.prototype.removeEventListener;\n\n\tfunction installEventTarget(Type) {\n\t\tif(Type[eventTargetInstalledSymbol]) {\n\t\t\treturn;\n\t\t}\n\t\tconst eventQueueAddEventListener = Type.prototype.addEventListener;\n\t\tconst eventQueueRemoveEventListener = Type.prototype.removeEventListener;\n\t\tType.prototype.addEventListener = function() {\n\t\t\teventQueueAddEventListener.apply(this, arguments);\n\t\t\treturn realAddEventListener.apply(this, arguments);\n\t\t};\n\t\tType.prototype.removeEventListener = function() {\n\t\t\teventQueueRemoveEventListener.apply(this, arguments);\n\t\t\treturn realRemoveEventListener.apply(this, arguments);\n\t\t};\n\t\tType[eventTargetInstalledSymbol] = true;\n\t}\n\n\t// Warn on special properties\n\t//!steal-remove-start\n\tfunction raisePropWarnings(Type, Base) {\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t// look for `static props`and fall back to `static define` if `props` doesn't exist\n\t\t\tlet props = typeof Type.props === \"object\" ?\n\t\t\t\tType.props :\n\t\t\t\ttypeof Type.define === \"object\" ?\n\t\t\t\t\tType.define :\n\t\t\t\t\t{};\n\t\t\t\n\t\t\tObject.keys(props).forEach(function(key) {\n\t\t\t\tif(\"on\" + key in Type.prototype) {\n\t\t\t\t\tdev.warn(`${canReflect_1_19_2_canReflect.getName(Type)}: The defined property [${key}] matches the name of a DOM event. This property could update unexpectedly. Consider renaming.`);\n\t\t\t\t}\n\t\t\t\telse if(key in Base.prototype) {\n\t\t\t\t\tdev.warn(`${canReflect_1_19_2_canReflect.getName(Type)}: The defined property [${key}] matches the name of a property on the type being extended, ${canReflect_1_19_2_canReflect.getName(Base)}. This could lead to errors by changing the expected behaviour of that property. Consider renaming.`);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\tclass DefinedClass extends mixinElement$1(Base) {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\t//!steal-remove-start\n\t\t\traisePropWarnings(this.constructor, Base);\n\t\t\t//!steal-remove-end\n\t\t\tinstallEventTarget(this.constructor);\n\t\t}\n\n\t\tinitialize(props) {\n\t\t\tsuper.initialize(props);\n\t\t\tlet prop, staticProps;\n\n\t\t\tif (this.constructor.props) {\n\t\t\t\tstaticProps = Object.keys(this.constructor.props);\n\t\t\t}\n\n\t\t\tfor (prop in this) {\n\t\t\t\tif (this.hasOwnProperty(prop)) {\n\t\t\t\t\tif (staticProps && staticProps.includes(prop)) {\n\t\t\t\t\t\tconst val = this[prop];\n\t\t\t\t\t\tdelete this[prop];\n\t\t\t\t\t\tthis[prop] = val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmixins$5.expando(this, prop, this[prop]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\treturn DefinedClass;\n};\n\nvar canAttributeEncoder_1_1_4_canAttributeEncoder = createCommonjsModule(function (module) {\n\n\n\n/**\n * @module {{}} can-attribute-encoder can-attribute-encoder\n * @parent can-dom-utilities\n * @collection can-infrastructure\n * @package ./package.json\n *\n * Encode and decode attribute names.\n *\n * @option {Object} An object with the methods:\n * [can-attribute-encoder.encode] and [can-attribute-encoder.decode].\n *\n */\n\n\nfunction each(items, callback){\n\tfor ( var i = 0; i < items.length; i++ ) {\n\t\tcallback(items[i], i);\n\t}\n}\n\nfunction makeMap(str){\n\tvar obj = {}, items = str.split(\",\");\n\teach(items, function(name){\n\t\tobj[name] = true;\n\t});\n\treturn obj;\n}\n\n// Attributes for which the case matters - shouldn’t be lowercased.\nvar caseMattersAttributes = makeMap(\"allowReorder,attributeName,attributeType,autoReverse,baseFrequency,baseProfile,calcMode,clipPathUnits,contentScriptType,contentStyleType,diffuseConstant,edgeMode,externalResourcesRequired,filterRes,filterUnits,glyphRef,gradientTransform,gradientUnits,kernelMatrix,kernelUnitLength,keyPoints,keySplines,keyTimes,lengthAdjust,limitingConeAngle,markerHeight,markerUnits,markerWidth,maskContentUnits,maskUnits,patternContentUnits,patternTransform,patternUnits,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,repeatCount,repeatDur,requiredExtensions,requiredFeatures,specularConstant,specularExponent,spreadMethod,startOffset,stdDeviation,stitchTiles,surfaceScale,systemLanguage,tableValues,textLength,viewBox,viewTarget,xChannelSelector,yChannelSelector,controlsList\");\n\nfunction camelCaseToSpinalCase(match, lowerCaseChar, upperCaseChar) {\n\treturn lowerCaseChar + \"-\" + upperCaseChar.toLowerCase();\n}\n\nfunction startsWith(allOfIt, startsWith) {\n\treturn allOfIt.indexOf(startsWith) === 0;\n}\n\nfunction endsWith(allOfIt, endsWith) {\n\treturn (allOfIt.length - allOfIt.lastIndexOf(endsWith)) === endsWith.length;\n}\n\nvar regexes = {\n\tleftParens: /\\(/g,\n\trightParens: /\\)/g,\n\tleftBrace: /\\{/g,\n\trightBrace: /\\}/g,\n\tcamelCase: /([a-z]|[0-9]|^)([A-Z])/g,\n\tforwardSlash: /\\//g,\n\tspace: /\\s/g,\n\tuppercase: /[A-Z]/g,\n\tuppercaseDelimiterThenChar: /:u:([a-z])/g,\n\tcaret: /\\^/g,\n\tdollar: /\\$/g,\n\tat: /@/g\n};\n\nvar delimiters = {\n\tprependUppercase: ':u:',\n\treplaceSpace: ':s:',\n\treplaceForwardSlash: ':f:',\n\treplaceLeftParens: ':lp:',\n\treplaceRightParens: ':rp:',\n\treplaceLeftBrace: ':lb:',\n\treplaceRightBrace: ':rb:',\n\treplaceCaret: ':c:',\n\treplaceDollar: ':d:',\n\treplaceAt: ':at:'\n};\n\nvar encoder = {};\n\n/**\n * @function can-attribute-encoder.encode encode\n * @parent can-attribute-encoder\n * @description Encode an attribute name\n *\n * @signature `encoder.encode(attributeName)`\n *\n * Note: specific encoding may change, but encoded attributes\n * can always be decoded using [can-attribute-encoder.decode].\n *\n * @body\n *\n * ```js\n * var encodedAttributeName = encoder.encode(\"{(^$foo/bar baz)}\");\n * div.setAttribute(encodedAttributeName, \"attribute value\");\n * ```\n *\n * @param {String} attributeName The attribute name.\n * @return {String} The encoded attribute name.\n *\n */\nencoder.encode = function(name) {\n\tvar encoded = name;\n\n\t// encode or convert camelCase attributes unless in list of attributes\n\t// where case matters\n\tif (!caseMattersAttributes[encoded] && encoded.match(regexes.camelCase)) {\n\t\t// encode uppercase characters in new bindings\n\t\t// - on:fooBar, fooBar:to, fooBar:from, fooBar:bind\n\t\tif (\n\t\t\tstartsWith(encoded, 'on:') ||\n\t\t\tendsWith(encoded, ':to') ||\n\t\t\tendsWith(encoded, ':from') ||\n\t\t\tendsWith(encoded, ':bind') ||\n\t\t\tendsWith(encoded, ':raw')\n\t\t) {\n\t\t\tencoded = encoded\n\t\t\t\t.replace(regexes.uppercase, function(char) {\n\t\t\t\t\treturn delimiters.prependUppercase + char.toLowerCase();\n\t\t\t\t});\n\t\t} else if(startsWith(encoded, '(') || startsWith(encoded, '{')) {\n\t\t\t// convert uppercase characters in older bindings to kebab-case\n\t\t\t// - {fooBar}, (fooBar), {(fooBar)}\n\t\t\tencoded = encoded.replace(regexes.camelCase, camelCaseToSpinalCase);\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\t\tdev.warn(\"can-attribute-encoder: Found attribute with name: \" + name + \". Converting to: \" + encoded + '.');\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t}\n\t}\n\n\t//encode spaces\n\tencoded = encoded.replace(regexes.space, delimiters.replaceSpace)\n\t\t//encode forward slashes\n\t\t.replace(regexes.forwardSlash, delimiters.replaceForwardSlash)\n\t\t// encode left parentheses\n\t\t.replace(regexes.leftParens, delimiters.replaceLeftParens)\n\t\t// encode right parentheses\n\t\t.replace(regexes.rightParens, delimiters.replaceRightParens)\n\t\t// encode left braces\n\t\t.replace(regexes.leftBrace, delimiters.replaceLeftBrace)\n\t\t// encode left braces\n\t\t.replace(regexes.rightBrace, delimiters.replaceRightBrace)\n\t\t// encode ^\n\t\t.replace(regexes.caret, delimiters.replaceCaret)\n\t\t// encode $\n\t\t.replace(regexes.dollar, delimiters.replaceDollar)\n\t\t// encode @\n\t\t.replace(regexes.at, delimiters.replaceAt);\n\n\treturn encoded;\n};\n\n/**\n * @function can-attribute-encoder.decode decode\n * @parent can-attribute-encoder\n * @description Decode an attribute name encoded by [can-attribute-encoder.encode]\n * @signature `encoder.decode(attributeName)`\n *\n * @body\n *\n * ```js\n * encoder.decode(attributeName); // -> \"{(^$foo/bar baz)}\"\n *\n * ```\n *\n * @param {String} attributeName The encoded attribute name.\n * @return {String} The decoded attribute name.\n *\n */\nencoder.decode = function(name) {\n\tvar decoded = name;\n\n\t// decode uppercase characters in new bindings\n\tif (!caseMattersAttributes[decoded] && regexes.uppercaseDelimiterThenChar.test(decoded)) {\n\t\tif (\n\t\t\tstartsWith(decoded, 'on:') ||\n\t\t\tendsWith(decoded, ':to') ||\n\t\t\tendsWith(decoded, ':from') ||\n\t\t\tendsWith(decoded, ':bind') ||\n\t\t\tendsWith(decoded, ':raw')\n\t\t) {\n\t\t\tdecoded = decoded\n\t\t\t\t.replace(regexes.uppercaseDelimiterThenChar, function(match, char) {\n\t\t\t\t\treturn char.toUpperCase();\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// decode left parentheses\n\tdecoded = decoded.replace(delimiters.replaceLeftParens, '(')\n\t\t// decode right parentheses\n\t\t.replace(delimiters.replaceRightParens, ')')\n\t\t// decode left braces\n\t\t.replace(delimiters.replaceLeftBrace, '{')\n\t\t// decode left braces\n\t\t.replace(delimiters.replaceRightBrace, '}')\n\t\t// decode forward slashes\n\t\t.replace(delimiters.replaceForwardSlash, '/')\n\t\t// decode spaces\n\t\t.replace(delimiters.replaceSpace, ' ')\n\t\t// decode ^\n\t\t.replace(delimiters.replaceCaret, '^')\n\t\t//decode $\n\t\t.replace(delimiters.replaceDollar, '$')\n\t\t//decode @\n\t\t.replace(delimiters.replaceAt, '@');\n\n\treturn decoded;\n};\n\nif (canNamespace_1_0_0_canNamespace.encoder) {\n\tthrow new Error(\"You can't have two versions of can-attribute-encoder, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.encoder = encoder;\n}\n});\n\n/* jshint maxdepth:7,node:true, latedef:false */\n\n\nfunction each(items, callback){\n\tfor ( var i = 0; i < items.length; i++ ) {\n\t\tcallback(items[i], i);\n\t}\n}\n\nfunction makeMap$1(str){\n\tvar obj = {}, items = str.split(\",\");\n\teach(items, function(name){\n\t\tobj[name] = true;\n\t});\n\treturn obj;\n}\n\nfunction handleIntermediate(intermediate, handler){\n\tfor(var i = 0, len = intermediate.length; i < len; i++) {\n\t\tvar item = intermediate[i];\n\t\thandler[item.tokenType].apply(handler, item.args);\n\t}\n\treturn intermediate;\n}\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\t//assign the function to a var to avoid jshint\n\t//\"Function declarations should not be placed in blocks\"\n\tvar countLines = function countLines(input) {\n\t\t// TODO: optimize?\n\t\treturn input.split('\\n').length - 1;\n\t};\n}\n//!steal-remove-end\n\nvar alphaNumeric = \"A-Za-z0-9\",\n\talphaNumericHU = \"-:_\"+alphaNumeric,\n\tmagicStart = \"{{\",\n\tendTag = new RegExp(\"^<\\\\/([\"+alphaNumericHU+\"]+)[^>]*>\"),\n\tmagicMatch = new RegExp(\"\\\\{\\\\{(![\\\\s\\\\S]*?!|[\\\\s\\\\S]*?)\\\\}\\\\}\\\\}?\",\"g\"),\n\tspace = /\\s/,\n\talphaRegex = new RegExp('['+ alphaNumeric + ']'),\n\tattributeRegexp = new RegExp(\"[\"+alphaNumericHU+\"]+\\s*=\\s*(\\\"[^\\\"]*\\\"|'[^']*')\");\n\n// Empty Elements - HTML 5\nvar empty = makeMap$1(\"area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed\");\n\n// Elements for which tag case matters - shouldn't be lowercased.\nvar caseMattersElements = makeMap$1(\"altGlyph,altGlyphDef,altGlyphItem,animateColor,animateMotion,animateTransform,clipPath,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,foreignObject,glyphRef,linearGradient,radialGradient,textPath\");\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar closeSelf = makeMap$1(\"colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr\");\n\n// Special Elements (can contain anything)\nvar special = makeMap$1(\"script\");\n\n// Callback names on `handler`.\nvar tokenTypes = \"start,end,close,attrStart,attrEnd,attrValue,chars,comment,special,done\".split(\",\");\n\n//maps end characters to start characters\nvar startOppositesMap = {\"{\": \"}\", \"(\":\")\"};\n\nvar fn = function(){};\n\nvar HTMLParser = function (html, handler, returnIntermediate) {\n\tif(typeof html === \"object\") {\n\t\treturn handleIntermediate(html, handler);\n\t}\n\n\tvar intermediate = [];\n\thandler = handler || {};\n\tif(returnIntermediate) {\n\t\t// overwrite handlers so they add to intermediate\n\t\teach(tokenTypes, function(name){\n\t\t\tvar callback = handler[name] || fn;\n\t\t\thandler[name] = function(){\n\t\t\t\tif( callback.apply(this, arguments) !== false ) {\n\t\t\t\t\tvar end = arguments.length;\n\n\t\t\t\t\t// the intermediate is stringified in the compiled stache templates\n\t\t\t\t\t// so we want to trim the last item if it is the line number\n\t\t\t\t\tif (arguments[end - 1] === undefined) {\n\t\t\t\t\t\tend = arguments.length - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t// but restore line number in dev mode\n\t\t\t\t\t\tend = arguments.length;\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\tintermediate.push({\n\t\t\t\t\t\ttokenType: name,\n\t\t\t\t\t\targs: [].slice.call(arguments, 0, end),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t}\n\n\tfunction parseStartTag(tag, tagName, rest, unary) {\n\t\ttagName = caseMattersElements[tagName] ? tagName : tagName.toLowerCase();\n\n\t\tif (closeSelf[tagName] && stack.last() === tagName) {\n\t\t\tparseEndTag(\"\", tagName);\n\t\t}\n\n\t\tunary = empty[tagName] || !!unary;\n\t\thandler.start(tagName, unary, lineNo);\n\t\tif (!unary) {\n\t\t\tstack.push(tagName);\n\t\t}\n\n\t\t// find attribute or special\n\t\tHTMLParser.parseAttrs(rest, handler, lineNo);\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tlineNo += countLines(tag);\n\t\t}\n\t\t//!steal-remove-end\n\n\n\t\thandler.end(tagName, unary, lineNo);\n\n\t\tif(tagName === \"html\") {\n\t\t\tskipChars = true;\n\t\t}\n\t}\n\n\tfunction parseEndTag(tag, tagName) {\n\t\t// If no tag name is provided, clean shop\n\t\tvar pos;\n\t\tif (!tagName) {\n\t\t\tpos = 0;\n\t\t}\n\t\t// Find the closest opened tag of the same type\n\t\telse {\n\t\t\ttagName = caseMattersElements[tagName] ? tagName : tagName.toLowerCase();\n\t\t\tfor (pos = stack.length - 1; pos >= 0; pos--) {\n\t\t\t\tif (stack[pos] === tagName) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (typeof tag === 'undefined') {\n\t\t\t\tif (stack.length > 0) {\n\t\t\t\t\tif (handler.filename) {\n\t\t\t\t\t\tdev.warn(handler.filename + \": expected closing tag \" + stack[pos] + \">\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdev.warn(\"expected closing tag \" + stack[pos] + \">\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (pos < 0 || pos !== stack.length - 1) {\n\t\t\t\tif (stack.length > 0) {\n\t\t\t\t\tif (handler.filename) {\n\t\t\t\t\t\tdev.warn(handler.filename + \":\" + lineNo + \": unexpected closing tag \" + tag + \" expected \" + stack[stack.length - 1] + \">\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdev.warn(lineNo + \": unexpected closing tag \" + tag + \" expected \" + stack[stack.length - 1] + \">\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (handler.filename) {\n\t\t\t\t\t\tdev.warn(handler.filename + \":\" + lineNo + \": unexpected closing tag \" + tag);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdev.warn(lineNo + \": unexpected closing tag \" + tag);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\tif (pos >= 0) {\n\t\t\t// Close all the open elements, up the stack\n\t\t\tfor (var i = stack.length - 1; i >= pos; i--) {\n\t\t\t\tif (handler.close) {\n\t\t\t\t\thandler.close(stack[i], lineNo);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the open elements from the stack\n\t\t\tstack.length = pos;\n\n\t\t\t// Don't add TextNodes after the tag\n\t\t\tif(tagName === \"body\") {\n\t\t\t\tskipChars = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction parseMustache(mustache, inside){\n\t\tif(handler.special){\n\t\t\thandler.special(inside, lineNo);\n\t\t}\n\t}\n\n\tvar callChars = function(){\n\t\tif(charsText && !skipChars) {\n\t\t\tif(handler.chars) {\n\t\t\t\thandler.chars(charsText, lineNo);\n\t\t\t}\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tlineNo += countLines(charsText);\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t}\n\n\t\tskipChars = false;\n\t\tcharsText = \"\";\n\t};\n\n\tvar index,\n\t\tchars,\n\t\tskipChars,\n\t\tmatch,\n\t\tlineNo,\n\t\tstack = [],\n\t\tlast = html,\n\t\t// an accumulating text for the next .chars callback\n\t\tcharsText = \"\";\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tlineNo = 1;\n\t}\n\t//!steal-remove-end\n\n\tstack.last = function () {\n\t\treturn this[this.length - 1];\n\t};\n\n\twhile (html) {\n\n\t\tchars = true;\n\n\t\t// Make sure we're not in a script or style element\n\t\tif (!stack.last() || !special[stack.last()]) {\n\n\t\t\t// Comment\n\t\t\tif (html.indexOf(\"\");\n\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tcallChars();\n\t\t\t\t\tif (handler.comment) {\n\t\t\t\t\t\thandler.comment(html.substring(4, index), lineNo);\n\t\t\t\t\t}\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tlineNo += countLines(html.substring(0, index + 3));\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\thtml = html.substring(index + 3);\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\n\t\t\t\t// end tag\n\t\t\t} else if (html.indexOf(\"\") === 0) {\n\t\t\t\tmatch = html.match(endTag);\n\n\t\t\t\tif (match) {\n\t\t\t\t\tcallChars();\n\t\t\t\t\tmatch[0].replace(endTag, parseEndTag);\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tlineNo += countLines(html.substring(0, match[0].length));\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\thtml = html.substring(match[0].length);\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\n\t\t\t\t// start tag\n\t\t\t} else if (html.indexOf(\"<\") === 0) {\n\t\t\t\tvar res = HTMLParser.searchStartTag(html);\n\n\t\t\t\tif(res) {\n\t\t\t\t\tcallChars();\n\t\t\t\t\tparseStartTag.apply(null, res.match);\n\n\t\t\t\t\thtml = res.html;\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\n\t\t\t\t// magic tag\n\t\t\t} else if (html.indexOf(magicStart) === 0 ) {\n\t\t\t\tmatch = html.match(magicMatch);\n\n\t\t\t\tif (match) {\n\t\t\t\t\tcallChars();\n\t\t\t\t\tmatch[0].replace(magicMatch, parseMustache);\n\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tlineNo += countLines(html.substring(0, match[0].length));\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\thtml = html.substring(match[0].length);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (chars) {\n\t\t\t\tindex = findBreak(html, magicStart);\n\t\t\t\tif(index === 0 && html === last) {\n\t\t\t\t\tcharsText += html.charAt(0);\n\t\t\t\t\thtml = html.substr(1);\n\t\t\t\t\tindex = findBreak(html, magicStart);\n\t\t\t\t}\n\n\t\t\t\tvar text = index < 0 ? html : html.substring(0, index);\n\t\t\t\thtml = index < 0 ? \"\" : html.substring(index);\n\n\t\t\t\tif (text) {\n\t\t\t\t\tcharsText += text;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\thtml = html.replace(new RegExp(\"([\\\\s\\\\S]*?)<\\/\" + stack.last() + \"[^>]*>\"), function (all, text) {\n\t\t\t\ttext = text.replace(/|/g, \"$1$2\");\n\t\t\t\tif (handler.chars) {\n\t\t\t\t\thandler.chars(text, lineNo);\n\t\t\t\t}\n\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tlineNo += countLines(text);\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\n\t\t\t\treturn \"\";\n\t\t\t});\n\n\t\t\tparseEndTag(\"\", stack.last());\n\t\t}\n\n\t\tif (html === last) {\n\t\t\tthrow new Error(\"Parse Error: \" + html);\n\t\t}\n\n\t\tlast = html;\n\t}\n\tcallChars();\n\t// Clean up any remaining tags\n\tparseEndTag();\n\n\n\thandler.done(lineNo);\n\treturn intermediate;\n};\n\nvar callAttrStart = function(state, curIndex, handler, rest, lineNo){\n\tvar attrName = rest.substring(typeof state.nameStart === \"number\" ? state.nameStart : curIndex, curIndex),\n\t\tnewAttrName = canAttributeEncoder_1_1_4_canAttributeEncoder.encode(attrName);\n\n\tstate.attrStart = newAttrName;\n\thandler.attrStart(state.attrStart, lineNo);\n\tstate.inName = false;\n};\n\nvar callAttrEnd = function(state, curIndex, handler, rest, lineNo){\n\tif(state.valueStart !== undefined && state.valueStart < curIndex) {\n\t\tvar val = rest.substring(state.valueStart, curIndex);\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tvar quotedVal, closedQuote;\n\t\t\tquotedVal = rest.substring(state.valueStart - 1, curIndex + 1);\n\t\t\tquotedVal = quotedVal.trim();\n\t\t\tclosedQuote = quotedVal.charAt(quotedVal.length - 1);\n\n\t\t\tif (state.inQuote !== closedQuote) {\n\t\t\t\tif (handler.filename) {\n\t\t\t\t\tdev.warn(handler.filename + \":\" + lineNo + \": End quote is missing for \" + val);\n\t\t\t\t} else {\n\t\t\t\t\tdev.warn(lineNo + \": End quote is missing for \" + val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\t\thandler.attrValue(val, lineNo);\n\t}\n\t// if this never got to be inValue, like `DISABLED` then send a attrValue\n\t// else if(!state.inValue){\n\t// \thandler.attrValue(state.attrStart, lineNo);\n\t// }\n\n\thandler.attrEnd(state.attrStart, lineNo);\n\tstate.attrStart = undefined;\n\tstate.valueStart = undefined;\n\tstate.inValue = false;\n\tstate.inName = false;\n\tstate.lookingForEq = false;\n\tstate.inQuote = false;\n\tstate.lookingForName = true;\n};\n\nvar findBreak = function(str, magicStart) {\n\tvar magicLength = magicStart.length;\n\tfor(var i = 0, len = str.length; i < len; i++) {\n\t\tif(str[i] === \"<\" || str.substr(i, magicLength) === magicStart) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\nHTMLParser.parseAttrs = function(rest, handler, lineNo){\n\tif(!rest) {\n\t\treturn;\n\t}\n\n\tvar i = 0;\n\tvar curIndex;\n\tvar state = {\n\t\tinName: false,\n\t\tnameStart: undefined,\n\t\tinValue: false,\n\t\tvalueStart: undefined,\n\t\tinQuote: false,\n\t\tattrStart: undefined,\n\t\tlookingForName: true,\n\t\tlookingForValue: false,\n\t\tlookingForEq : false\n\t};\n\n\twhile(i < rest.length) {\n\t\tcurIndex = i;\n\t\tvar cur = rest.charAt(i);\n\t\ti++;\n\n\t\tif(magicStart === rest.substr(curIndex, magicStart.length) ) {\n\t\t\tif(state.inValue && curIndex > state.valueStart) {\n\t\t\t\thandler.attrValue(rest.substring(state.valueStart, curIndex), lineNo);\n\t\t\t}\n\t\t\t// `{{#foo}}DISABLED{{/foo}}`\n\t\t\telse if(state.inName && state.nameStart < curIndex) {\n\t\t\t\tcallAttrStart(state, curIndex, handler, rest, lineNo);\n\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t}\n\t\t\t// foo={{bar}}\n\t\t\telse if(state.lookingForValue){\n\t\t\t\tstate.inValue = true;\n\t\t\t}\n\t\t\t// a {{bar}}\n\t\t\telse if(state.lookingForEq && state.attrStart) {\n\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t}\n\n\t\t\tmagicMatch.lastIndex = curIndex;\n\t\t\tvar match = magicMatch.exec(rest);\n\t\t\tif(match) {\n\t\t\t\thandler.special(match[1], lineNo);\n\t\t\t\t// i is already incremented\n\t\t\t\ti = curIndex + (match[0].length);\n\t\t\t\tif(state.inValue) {\n\t\t\t\t\tstate.valueStart = curIndex+match[0].length;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(state.inValue) {\n\t\t\tif(state.inQuote) {\n\t\t\t\tif(cur === state.inQuote) {\n\t\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(space.test(cur)) {\n\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t}\n\t\t}\n\t\t// if we hit an = outside a value\n\t\telse if(cur === \"=\" && (state.lookingForEq || state.lookingForName || state.inName)) {\n\t\t\t// if we haven't yet started this attribute `{{}}=foo` case:\n\t\t\tif(!state.attrStart) {\n\t\t\t\tcallAttrStart(state, curIndex, handler, rest, lineNo);\n\t\t\t}\n\t\t\tstate.lookingForValue = true;\n\t\t\tstate.lookingForEq = false;\n\t\t\tstate.lookingForName = false;\n\t\t}\n\t\t// if we are currently in a name:\n\t\t// when the name starts with `{` or `(`\n\t\t// it isn't finished until the matching end character is found\n\t\t// otherwise, a space finishes the name\n\t\telse if(state.inName) {\n\t\t\tvar started = rest[ state.nameStart ],\n\t\t\t\t\totherStart, otherOpposite;\n\t\t\tif(startOppositesMap[started] === cur) {\n\t\t\t\t//handle mismatched brackets: `{(})` or `({)}`\n\t\t\t\totherStart = started === \"{\" ? \"(\" : \"{\";\n\t\t\t\totherOpposite = startOppositesMap[otherStart];\n\n\t\t\t\tif(rest[curIndex+1] === otherOpposite){\n\t\t\t\t\tcallAttrStart(state, curIndex+2, handler, rest, lineNo);\n\t\t\t\t\ti++;\n\t\t\t\t}else{\n\t\t\t\t\tcallAttrStart(state, curIndex+1, handler, rest, lineNo);\n\t\t\t\t}\n\n\t\t\t\tstate.lookingForEq = true;\n\t\t\t}\n\t\t\telse if(space.test(cur) && started !== \"{\" && started !== \"(\") {\n\t\t\t\t\tcallAttrStart(state, curIndex, handler, rest, lineNo);\n\t\t\t\t\tstate.lookingForEq = true;\n\t\t\t}\n\t\t}\n\t\telse if(state.lookingForName) {\n\t\t\tif(!space.test(cur)) {\n\t\t\t\t// might have just started a name, we need to close it\n\t\t\t\tif(state.attrStart) {\n\t\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t\t}\n\t\t\t\tstate.nameStart = curIndex;\n\t\t\t\tstate.inName = true;\n\t\t\t}\n\t\t}\n\t\telse if(state.lookingForValue) {\n\t\t\tif(!space.test(cur)) {\n\t\t\t\tstate.lookingForValue = false;\n\t\t\t\tstate.inValue = true;\n\t\t\t\tif(cur === \"'\" || cur === '\"') {\n\t\t\t\t\tstate.inQuote = cur;\n\t\t\t\t\tstate.valueStart = curIndex+1;\n\t\t\t\t} else {\n\t\t\t\t\tstate.valueStart = curIndex;\n\t\t\t\t}\n\t\t\t\t// if we are looking for a value\n\t\t\t\t// at the end of the loop we need callAttrEnd\n\t\t\t} else if (i === rest.length){\n\t\t\t\tcallAttrEnd(state, curIndex, handler, rest, lineNo);\n\t\t\t}\n\t\t}\n\t}\n\n\tif(state.inName) {\n\t\tcallAttrStart(state, curIndex+1, handler, rest, lineNo);\n\t\tcallAttrEnd(state, curIndex+1, handler, rest, lineNo);\n\t} else if(state.lookingForEq || state.lookingForValue || state.inValue) {\n\t\tcallAttrEnd(state, curIndex+1, handler, rest, lineNo);\n\t}\n\tmagicMatch.lastIndex = 0;\n};\n\nHTMLParser.searchStartTag = function (html) {\n\tvar closingIndex = html.indexOf('>');\n\n\t// The first closing bracket we find might be in an attribute value.\n\t// Move through the attributes by regexp.\n\tvar attributeRange = attributeRegexp.exec(html.substring(1));\n\tvar afterAttributeOffset = 1;\n\t// if the closing index is after the next attribute...\n\twhile(attributeRange && closingIndex >= afterAttributeOffset + attributeRange.index) {\n\n\t\t// prepare to move to the attribute after this one by increasing the offset\n\t\tafterAttributeOffset += attributeRange.index + attributeRange[0].length;\n\t\t// if the closing index is before the new offset, then this closing index is inside\n\t\t// an attribute value and should be ignored. Find the *next* closing character.\n\t\twhile(closingIndex < afterAttributeOffset) {\n\t\t\tclosingIndex += html.substring(closingIndex + 1).indexOf('>') + 1;\n\t\t}\n\n\t\t// find the next attribute by starting from the new offset.\n\t\tattributeRange = attributeRegexp.exec(html.substring(afterAttributeOffset));\n\t}\n\n\t// if there is no closing bracket\n\t// \n\t// it is not a startTag\n\tif(closingIndex === -1 || !(alphaRegex.test(html[1]))){\n\t\treturn null;\n\t}\n\n\tvar tagName, tagContent, match, rest = '', unary = '';\n\tvar startTag = html.substring(0, closingIndex + 1);\n\tvar isUnary = startTag[startTag.length-2] === '/';\n\tvar spaceIndex = startTag.search(space);\n\n\tif(isUnary){\n\t\tunary = '/';\n\t\ttagContent = startTag.substring(1, startTag.length-2).trim();\n\t} else {\n\t\ttagContent = startTag.substring(1, startTag.length-1).trim();\n\t}\n\n\tif(spaceIndex === -1){\n\t\ttagName = tagContent;\n\t} else {\n\t\t//spaceIndex needs to shift one to the left\n\t\tspaceIndex--;\n\t\ttagName = tagContent.substring(0, spaceIndex);\n\t\trest = tagContent.substring(spaceIndex);\n\t}\n\n\tmatch = [startTag, tagName, rest, unary];\n\n\treturn {\n\t\tmatch: match,\n\t\thtml: html.substring(startTag.length),\n\t};\n\n\n};\n\nvar canViewParser_4_1_3_canViewParser = canNamespace_1_0_0_canNamespace.HTMLParser = HTMLParser;\n\n/**\n * @module {function} can-globals/location/location location\n * @parent can-globals/modules\n * \n * Get the global [`location`](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) object for the current context.\n * \n * @signature `LOCATION([newLocation])`\n * \n * Optionally sets, and returns, the [`location`](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) object for the context.\n * \n * ```js\n * var locationShim = { path: '/' };\n * var LOCATION = require('can-globals/location/location');\n * LOCATION(locationShim);\n * LOCATION().path; // -> '/'\n * ```\n *\n * @param {Object} location An optional location-like object to set as the context's location\n *\n * @return {Object} The location object for this JavaScript environment.\n */\ncanGlobals_1_2_2_canGlobalsInstance.define('location', function(){\n\treturn canGlobals_1_2_2_canGlobalsInstance.getKeyValue('global').location;\n});\n\nvar location_1 = canGlobals_1_2_2_canGlobalsInstance.makeExport('location');\n\n/**\n * @module {function} can-globals/mutation-observer/mutation-observer mutation-observer\n * @parent can-globals/modules\n * \n * Get the global [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) object for the current context.\n * \n * @signature `MUTATIONOBSERVER([newMutationObserver])`\n * \n * Optionally sets, and returns, the [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) object for the context.\n * \n * ```js\n * var mutationObserverShim = require('can-globals/mutation-observer/mutation-observer');\n * MUTATIONOBSERVER(mutationObserverShim);\n * MUTATIONOBSERVER() //-> MutationObserver\n * ```\n *\n * @param {Object} MutationObserver An optional MutationObserver-like object to set as the context's MutationObserver\n *\n * @return {Object} The MutationObserver object for this JavaScript environment.\n */\n\ncanGlobals_1_2_2_canGlobalsInstance.define('MutationObserver', function(){\n\tvar GLOBAL = canGlobals_1_2_2_canGlobalsInstance.getKeyValue('global');\n\treturn GLOBAL.MutationObserver || GLOBAL.WebKitMutationObserver || GLOBAL.MozMutationObserver;\n});\n\nvar mutationObserver = canGlobals_1_2_2_canGlobalsInstance.makeExport('MutationObserver');\n\n/**\n * @module {function} can-globals/custom-elements/custom-elements custom-elements\n * @parent can-globals/modules\n *\n * Get the global [`customElements`](https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements) object for the current context.\n *\n * @signature `CUSTOMELEMENTS([newCustomElements])`\n *\n * Optionally sets, and returns, the [`customElements`](https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements) object for the context.\n *\n * ```js\n * var customElementsShim = require('some-custom-elements-shim');\n * CUSTOMELEMENTS(customElementsShim);\n * CUSTOMELEMENTS() //-> customElementsShim\n * ```\n *\n * @param {Object} customElements An optional CustomElementRegistry-like object to set as the context's customElements\n *\n * @return {Object} The customElements object for this JavaScript environment.\n */\n\ncanGlobals_1_2_2_canGlobalsInstance.define('customElements', function(){\n\tvar GLOBAL = canGlobals_1_2_2_canGlobalsInstance.getKeyValue('global');\n\treturn GLOBAL.customElements;\n});\n\nvar customElements = canGlobals_1_2_2_canGlobalsInstance.makeExport('customElements');\n\nvar canGlobals_1_2_2_canGlobals = canGlobals_1_2_2_canGlobalsInstance;\n\nfunction eliminate(array, item) {\n\tvar index = array.indexOf(item);\n\tif (index >= 0) {\n\t\tarray.splice(index, 1);\n\t}\n}\nfunction wasNotInSet(item, set) {\n\tvar inSet = set.has(item);\n\tif(inSet === false) {\n\t\tset.add(item);\n\t}\n\treturn !inSet;\n}\n\n\nfunction contains(parent, child){\n\tif(child && child.nodeType === Node.TEXT_NODE) {\n\t\treturn contains(parent, child.parentNode);\n\t}\n\tif(parent.contains) {\n\t\treturn parent.contains(child);\n\t}\n\tif(parent.nodeType === Node.DOCUMENT_NODE && parent.documentElement) {\n\t\treturn contains(parent.documentElement, child);\n\t} else {\n\t\tchild = child.parentNode;\n\t\tif(child === parent) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n}\n\nfunction isDocumentElement (node) {\n\treturn document$1().documentElement === node;\n}\n\nfunction isFragment (node) {\n\treturn !!(node && node.nodeType === 11);\n}\n\nfunction isElementNode (node) {\n\treturn !!(node && node.nodeType === 1);\n}\n\nfunction getChildren (parentNode) {\n\tvar nodes = [];\n\tvar node = parentNode.firstChild;\n\twhile (node) {\n\t\tnodes.push(node);\n\t\tnode = node.nextSibling;\n\t}\n\treturn nodes;\n}\n\nfunction getParents (node) {\n\tvar nodes;\n\tif (isFragment(node)) {\n\t\tnodes = getChildren(node);\n\t} else {\n\t\tnodes = [node];\n\t}\n\treturn nodes;\n}\n\n\nfunction getNodesLegacyB(node) {\n\tvar skip, tmp;\n\n\tvar depth = 0;\n\n\tvar items = isFragment(node) ? [] : [node];\n\tif(node.firstChild == null) {\n\t\treturn items;\n\t}\n\n\t// Always start with the initial element.\n\tdo {\n\t\tif ( !skip && (tmp = node.firstChild) ) {\n\t\t\tdepth++;\n\t\t\titems.push(tmp);\n\t\t} else if ( tmp = node.nextSibling ) {\n\t\t\tskip = false;\n\t\t\titems.push(tmp);\n\t\t} else {\n\t\t\t// Skipped or no first child and no next sibling, so traverse upwards,\n\t\t\ttmp = node.parentNode;\n\t\t\t// and decrement the depth.\n\t\t\tdepth--;\n\t\t\t// Enable skipping, so that in the next loop iteration, the children of\n\t\t\t// the now-current node (parent node) aren't processed again.\n\t\t\tskip = true;\n\t\t}\n\n\t\t// Instead of setting node explicitly in each conditional block, use the\n\t\t// tmp var and set it here.\n\t\tnode = tmp;\n\n\t\t// Stop if depth comes back to 0 (or goes below zero, in conditions where\n\t\t// the passed node has neither children nore next siblings).\n\t} while ( depth > 0 );\n\n\treturn items;\n}\n\n// IE11 requires a filter parameter for createTreeWalker\n// it also must be an object with an `acceptNode` property\nfunction treeWalkerFilterFunction() {\n\treturn NodeFilter.FILTER_ACCEPT;\n}\nvar treeWalkerFilter = treeWalkerFilterFunction;\ntreeWalkerFilter.acceptNode = treeWalkerFilterFunction;\n\nfunction getNodesWithTreeWalker(rootNode) {\n\tvar result = isFragment(rootNode) ? [] : [rootNode];\n\n\t// IE11 throws if createTreeWalker is called on a non-ElementNode\n\tvar walker = isElementNode(rootNode) && document$1().createTreeWalker(\n\t\trootNode,\n\t\tNodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,\n\t\ttreeWalkerFilter,\n\t\tfalse\n\t);\n\n\tvar node;\n\twhile(node = walker && walker.nextNode()) {\n\t\tresult.push(node);\n\t}\n\treturn result;\n}\n\nfunction getAllNodes (node) {\n\tif( document$1().createTreeWalker !== undefined ) {\n\t\treturn getNodesWithTreeWalker(node);\n\t} else {\n\t\treturn getNodesLegacyB(node);\n\t}\n}\n\nfunction subscription (fn) {\n\treturn function _subscription () {\n\t\tvar disposal = fn.apply(this, arguments);\n\t\tvar isDisposed = false;\n\t\treturn function _disposal () {\n\t\t\tif (isDisposed) {\n\t\t\t\tvar fnName = fn.name || fn.displayName || 'an anonymous function';\n\t\t\t\tvar message = 'Disposal function returned by ' + fnName + ' called more than once.';\n\t\t\t\tthrow new Error(message);\n\t\t\t}\n\t\t\tdisposal.apply(this, arguments);\n\t\t\tisDisposed = true;\n\t\t};\n\t};\n}\n\nvar canDomMutate_2_0_9_Util = {\n\teliminate: eliminate,\n\tgetDocument: document$1,\n\tisDocumentElement: isDocumentElement,\n\tisFragment: isFragment,\n\tgetParents: getParents,\n\tgetAllNodes: getAllNodes,\n\tgetChildren: getChildren,\n\tsubscription: subscription,\n\twasNotInSet: wasNotInSet,\n\tcontains: contains\n};\n\nvar contains$1 = canDomMutate_2_0_9_Util.contains;\nvar mutate = {};\nvar isConnected;\nfunction getIsConnectedFromNode(node) {\n\treturn node.isConnected;\n}\nfunction getIsConnectedFromDocument(node) {\n\tvar doc = node.ownerDocument;\n\t// if node *is* the document, ownerDocument is null\n\t// However, CanSimpleDom implements this incorrectly, and a document's ownerDocument is itself,\n\t// so make both checks\n\treturn doc === null || doc === node || contains$1(doc, node);\n}\n\nfunction setIsConnected(doc) {\n\tif(doc) {\n\t\tvar node = doc.createTextNode(\"\");\n\t\tisConnected = 'isConnected' in node.constructor.prototype ?\n\t\t\tgetIsConnectedFromNode :\n\t\t\tgetIsConnectedFromDocument;\n\t\tif(mutate) {\n\t\t\tmutate.isConnected = isConnected;\n\t\t}\n\t} else {\n\t\tmutate.isConnected = getIsConnectedFromNode;\n\t}\n}\nsetIsConnected(canGlobals_1_2_2_canGlobals.getKeyValue(\"document\"));\ncanGlobals_1_2_2_canGlobals.onKeyValue(\"document\", setIsConnected);\n\nvar canDomMutate_2_0_9_IsConnected = mutate;\n\nvar eliminate$1 = canDomMutate_2_0_9_Util.eliminate;\nvar subscription$1 = canDomMutate_2_0_9_Util.subscription;\nvar isDocumentElement$1 = canDomMutate_2_0_9_Util.isDocumentElement;\nvar getAllNodes$1 = canDomMutate_2_0_9_Util.getAllNodes;\n\nvar domMutate,\n\tdispatchNodeInserted,\n\tdispatchNodeConnected,\n\tdispatchGlobalConnected,\n\tdispatchNodeRemoved,\n\tdispatchNodeDisconnected,\n\tdispatchGlobalDisconnected,\n\tdispatchAttributeChange;\n\nvar dataStore = new WeakMap();\n\n\nvar queue;\n\nfunction getRelatedData(node, key) {\n\tvar data = dataStore.get(node);\n\tif (data) {\n\t\treturn data[key];\n\t}\n}\n\nfunction setRelatedData(node, key, targetListenersMap) {\n\tvar data = dataStore.get(node);\n\tif (!data) {\n\t\tdata = {};\n\t\tdataStore.set(node, data);\n\t}\n\tdata[key] = targetListenersMap;\n}\n\nfunction deleteRelatedData(node, key) {\n\tvar data = dataStore.get(node);\n\treturn delete data[key];\n}\n\nfunction toMutationEvent(node, mutation) {\n\treturn {target: node, sourceMutation: mutation};\n}\n\nfunction getDocumentListeners (target, key) {\n\t// TODO: it's odd these functions read DOCUMENT() instead of\n\t// target.ownerDocument. To change to ownerDocument, we might need a \"is document\"\n\t// check.\n\tvar doc = document$1();\n\tvar data = getRelatedData(doc, key);\n\tif (data) {\n\t\treturn data.listeners;\n\t}\n}\n\nfunction getTargetListeners (target, key) {\n\tvar doc = document$1();\n\tvar targetListenersMap = getRelatedData(doc, key);\n\tif (!targetListenersMap) {\n\t\treturn;\n\t}\n\n\treturn targetListenersMap.get(target);\n}\n\nfunction addTargetListener (target, key, listener) {\n\tvar doc = document$1();\n\tvar targetListenersMap = getRelatedData(doc, key);\n\tif (!targetListenersMap) {\n\t\ttargetListenersMap = new WeakMap();\n\t\tsetRelatedData(doc, key, targetListenersMap);\n\t}\n\tvar targetListeners = targetListenersMap.get(target);\n\tif (!targetListeners) {\n\t\ttargetListeners = [];\n\t\ttargetListenersMap.set(target, targetListeners);\n\t}\n\ttargetListeners.push(listener);\n}\n\nfunction removeTargetListener (target, key, listener) {\n\tvar doc = document$1();\n\tvar targetListenersMap = getRelatedData(doc, key);\n\tif (!targetListenersMap) {\n\t\treturn;\n\t}\n\tvar targetListeners = targetListenersMap.get(target);\n\tif (!targetListeners) {\n\t\treturn;\n\t}\n\teliminate$1(targetListeners, listener);\n\tif (targetListeners.length === 0) {\n\t\ttargetListenersMap['delete'](target);\n\t\tif (targetListenersMap.size === 0) {\n\t\t\tdeleteRelatedData(doc, key);\n\t\t}\n\t}\n}\n\nvar promise = Promise.resolve();\nfunction nextTick(handler) {\n\tpromise.then(handler);\n}\n\n//var recordsAndCallbacks = null;\n\nfunction flushCallbacks(callbacks, arg){\n\tvar callbacksCount = callbacks.length;\n\tvar safeCallbacks = callbacks.slice(0);\n\tfor(var c = 0; c < callbacksCount; c++){\n\t\tsafeCallbacks[c](arg);\n\t}\n}\n\nfunction dispatch$1(getListeners, targetKey) {\n\n\treturn function dispatchEvents(event) {\n\t\tvar targetListeners = getListeners(event.target, targetKey);\n\n\t\tif (targetListeners) {\n\t\t\tflushCallbacks(targetListeners, event);\n\t\t}\n\t};\n}\n\nvar count = 0;\n\nfunction observeMutations(target, observerKey, config, handler) {\n\n\tvar observerData = getRelatedData(target, observerKey);\n\tif (!observerData) {\n\t\tobserverData = {\n\t\t\tobservingCount: 0\n\t\t};\n\t\tsetRelatedData(target, observerKey, observerData);\n\t}\n\n\tvar setupObserver = function () {\n\t\t// disconnect the old one\n\t\tif (observerData.observer) {\n\t\t\tobserverData.observer.disconnect();\n\t\t\tobserverData.observer = null;\n\t\t}\n\n\t\tvar MutationObserver = mutationObserver();\n\t\tif (MutationObserver) {\n\t\t\tvar Node = global_1().Node;\n\t\t\tvar isRealNode = !!(Node && target instanceof Node);\n\t\t\tif (isRealNode) {\n\t\t\t\tvar targetObserver = new MutationObserver(handler);\n\t\t\t\ttargetObserver.id = count++;\n\t\t\t\ttargetObserver.observe(target, config);\n\t\t\t\tobserverData.observer = targetObserver;\n\t\t\t}\n\t\t}\n\t};\n\n\tif (observerData.observingCount === 0) {\n\t\tcanGlobals_1_2_2_canGlobals.onKeyValue('MutationObserver', setupObserver);\n\t\tsetupObserver();\n\t}\n\n\tobserverData.observingCount++;\n\treturn function stopObservingMutations() {\n\t\tvar observerData = getRelatedData(target, observerKey);\n\t\tif (observerData) {\n\t\t\tobserverData.observingCount--;\n\t\t\tif (observerData.observingCount <= 0) {\n\t\t\t\tif (observerData.observer) {\n\t\t\t\t\tobserverData.observer.disconnect();\n\t\t\t\t}\n\t\t\t\tdeleteRelatedData(target, observerKey);\n\t\t\t\tcanGlobals_1_2_2_canGlobals.offKeyValue('MutationObserver', setupObserver);\n\t\t\t}\n\t\t}\n\t};\n}\n\nvar treeMutationConfig = {\n\tsubtree: true,\n\tchildList: true\n};\n\nvar attributeMutationConfig = {\n\tattributes: true,\n\tattributeOldValue: true\n};\n\nfunction addNodeListener(listenerKey, observerKey, isAttributes) {\n\treturn subscription$1(function _addNodeListener(target, listener) {\n\t\t// DocumentFragment\n\t\tif(target.nodeType === 11) {\n\t\t\t// This returns a noop without actually doing anything.\n\t\t\t// We should probably warn about passing a DocumentFragment here,\n\t\t\t// but since can-stache does so currently we are ignoring until that is\n\t\t\t// fixed.\n\t\t\treturn Function.prototype;\n\t\t}\n\n\t\tvar stopObserving;\n\t\tif (isAttributes) {\n\t\t\tstopObserving = observeMutations(target, observerKey, attributeMutationConfig, queue.enqueueAndFlushMutations);\n\t\t} else {\n\t\t\tstopObserving = observeMutations(document$1(), observerKey, treeMutationConfig, queue.enqueueAndFlushMutations);\n\t\t}\n\n\t\taddTargetListener(target, listenerKey, listener);\n\t\treturn function removeNodeListener() {\n\t\t\tif(stopObserving) {\n\t\t\t\tstopObserving();\n\t\t\t}\n\n\t\t\tremoveTargetListener(target, listenerKey, listener);\n\t\t};\n\t});\n}\n\nfunction addGlobalListener(globalDataKey, addNodeListener) {\n\treturn subscription$1(function addGlobalGroupListener(documentElement, listener) {\n\t\tif (!isDocumentElement$1(documentElement)) {\n\t\t\tthrow new Error('Global mutation listeners must pass a documentElement');\n\t\t}\n\n\t\tvar doc = document$1();\n\t\tvar documentData = getRelatedData(doc, globalDataKey);\n\t\tif (!documentData) {\n\t\t\tdocumentData = {listeners: []};\n\t\t\tsetRelatedData(doc, globalDataKey, documentData);\n\t\t}\n\n\t\tvar listeners = documentData.listeners;\n\t\tif (listeners.length === 0) {\n\t\t\t// We need at least on listener for mutation events to propagate\n\t\t\tdocumentData.removeListener = addNodeListener(doc, function () {});\n\t\t}\n\n\t\tlisteners.push(listener);\n\n\t\treturn function removeGlobalGroupListener() {\n\t\t\tvar documentData = getRelatedData(doc, globalDataKey);\n\t\t\tif (!documentData) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar listeners = documentData.listeners;\n\t\t\teliminate$1(listeners, listener);\n\t\t\tif (listeners.length === 0) {\n\t\t\t\tdocumentData.removeListener();\n\t\t\t\tdeleteRelatedData(doc, globalDataKey);\n\t\t\t}\n\t\t};\n\t});\n}\n\n\n\nvar domMutationPrefix = 'domMutation';\n\n// target listener keys\nvar connectedDataKey = domMutationPrefix + 'ConnectedData';\nvar disconnectedDataKey = domMutationPrefix + 'DisconnectedData';\nvar insertedDataKey = domMutationPrefix + 'InsertedData';\nvar removedDataKey = domMutationPrefix + 'RemovedData';\nvar attributeChangeDataKey = domMutationPrefix + 'AttributeChangeData';\n\n// document listener keys\nvar documentConnectedDataKey = domMutationPrefix + 'DocumentConnectedData';\nvar documentDisconnectedDataKey = domMutationPrefix + 'DocumentDisconnectedData';\nvar documentAttributeChangeDataKey = domMutationPrefix + 'DocumentAttributeChangeData';\n\n// observer keys\nvar treeDataKey = domMutationPrefix + 'TreeData';\nvar attributeDataKey = domMutationPrefix + 'AttributeData';\n\ndispatchNodeInserted = dispatch$1(getTargetListeners, insertedDataKey);\ndispatchNodeConnected = dispatch$1(getTargetListeners, connectedDataKey);\ndispatchGlobalConnected = dispatch$1(getDocumentListeners, documentConnectedDataKey);\n\ndispatchNodeRemoved = dispatch$1(getTargetListeners, removedDataKey);\ndispatchNodeDisconnected = dispatch$1(getTargetListeners, disconnectedDataKey);\ndispatchGlobalDisconnected = dispatch$1(getDocumentListeners, documentDisconnectedDataKey);\n\ndispatchAttributeChange = dispatch$1(getTargetListeners, attributeChangeDataKey);\n\n// node listeners\nvar addNodeConnectedListener = addNodeListener(connectedDataKey, treeDataKey);\nvar addNodeDisconnectedListener = addNodeListener(disconnectedDataKey, treeDataKey);\nvar addNodeInsertedListener = addNodeListener(insertedDataKey, treeDataKey);\nvar addNodeRemovedListener = addNodeListener(removedDataKey, treeDataKey);\nvar addNodeAttributeChangeListener = addNodeListener(attributeChangeDataKey, attributeDataKey, true);\n\n// global listeners\nvar addConnectedListener = addGlobalListener(\n\tdocumentConnectedDataKey,\n\taddNodeConnectedListener\n);\nvar addDisconnectedListener = addGlobalListener(\n\tdocumentDisconnectedDataKey,\n\taddNodeDisconnectedListener\n);\nvar addAttributeChangeListener = addGlobalListener(\n\tdocumentAttributeChangeDataKey,\n\taddNodeAttributeChangeListener\n);\n\n// ==========================================\nfunction dispatchTreeMutation(mutation, processedState) {\n\t// was the mutation connected\n\tvar wasConnected = mutation.isConnected === true || mutation.isConnected === undefined;\n\n\t// there are\n\t// - the global connected\n\t// - individual connected\n\t// - individual inserted\n\tvar removedCount = mutation.removedNodes.length;\n\tfor (var r = 0; r < removedCount; r++) {\n\t\t// get what already isn't in `removed`\n\n\t\t// see if \"removed\"\n\t\t// if wasConnected .. dispatch disconnected\n\t\tvar removedNodes = getAllNodes$1(mutation.removedNodes[r]);\n\t\tremovedNodes.forEach(function(node){\n\t\t\tvar event = toMutationEvent(node, mutation);\n\n\t\t\tif( canDomMutate_2_0_9_Util.wasNotInSet(node, processedState.removed) ) {\n\t\t\t\tdispatchNodeRemoved( event );\n\t\t\t}\n\t\t\tif(wasConnected && canDomMutate_2_0_9_Util.wasNotInSet(node, processedState.disconnected) ) {\n\t\t\t\tdispatchNodeDisconnected( event );\n\t\t\t\tdispatchGlobalDisconnected( event );\n\t\t\t}\n\t\t});\n\t}\n\n\tvar addedCount = mutation.addedNodes.length;\n\tfor (var a = 0; a < addedCount; a++) {\n\t\tvar insertedNodes = getAllNodes$1(mutation.addedNodes[a]);\n\t\tinsertedNodes.forEach(function(node){\n\t\t\tvar event = toMutationEvent(node, mutation);\n\n\t\t\tif(canDomMutate_2_0_9_Util.wasNotInSet(node, processedState.inserted)) {\n\t\t\t\tdispatchNodeInserted( event );\n\t\t\t}\n\t\t\tif(wasConnected && canDomMutate_2_0_9_Util.wasNotInSet(node, processedState.connected) ) {\n\t\t\t\tdispatchNodeConnected( event );\n\t\t\t\tdispatchGlobalConnected( event );\n\t\t\t}\n\t\t});\n\t}\n\t// run mutation\n}\n\n\nvar FLUSHING_MUTATIONS = [];\nvar IS_FLUSHING = false;\n\nvar IS_FLUSH_PENDING = false;\nvar ENQUEUED_MUTATIONS = [];\n\nqueue = {\n\t// This is used to dispatch mutations immediately.\n\t// This is usually called by the result of a mutation observer.\n\tenqueueAndFlushMutations: function(mutations) {\n\t\tif(IS_FLUSH_PENDING) {\n\t\t\tFLUSHING_MUTATIONS = FLUSHING_MUTATIONS.concat(ENQUEUED_MUTATIONS);\n\t\t\tIS_FLUSH_PENDING = false;\n\t\t\tENQUEUED_MUTATIONS = [];\n\t\t}\n\n\t\tFLUSHING_MUTATIONS = FLUSHING_MUTATIONS.concat(mutations);\n\t\tif(IS_FLUSHING) {\n\t\t\treturn;\n\t\t}\n\n\t\tIS_FLUSHING = true;\n\n\t\tvar index = 0;\n\n\t\tvar processedState = {\n\t\t\tconnected: new Set(),\n\t\t\tdisconnected: new Set(),\n\t\t\tinserted: new Set(),\n\t\t\tremoved: new Set()\n\t\t};\n\n\t\twhile(index < FLUSHING_MUTATIONS.length) {\n\t\t\tvar mutation = FLUSHING_MUTATIONS[index];\n\t\t\t// process mutation\n\t\t\tif(mutation.type === \"childList\") {\n\t\t\t\tdispatchTreeMutation(mutation, processedState);\n\t\t\t} else if(mutation.type === \"attributes\") {\n\t\t\t\tdispatchAttributeChange(mutation);\n\t\t\t}\n\t\t\tindex++;\n\n\t\t}\n\t\tFLUSHING_MUTATIONS = [];\n\t\tIS_FLUSHING = false;\n\t},\n\t// called to dipatch later unless we are already dispatching.\n\tenqueueMutationsAndFlushAsync: function(mutations){\n\t\tENQUEUED_MUTATIONS = ENQUEUED_MUTATIONS.concat(mutations);\n\n\t\t// if there are currently dispatching mutations, this should happen sometime after\n\t\tif(!IS_FLUSH_PENDING) {\n\t\t\tIS_FLUSH_PENDING = true;\n\t\t\tnextTick(function(){\n\t\t\t\tif(IS_FLUSH_PENDING) {\n\t\t\t\t\tIS_FLUSH_PENDING = false;\n\t\t\t\t\tvar pending = ENQUEUED_MUTATIONS;\n\t\t\t\t\tENQUEUED_MUTATIONS = [];\n\t\t\t\t\tqueue.enqueueAndFlushMutations(pending);\n\t\t\t\t} else {\n\t\t\t\t\t// Someone called enqueueAndFlushMutations before this finished.\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n};\n\n\n// ==========================================\n\n\ndomMutate = {\n\t/**\n\t* @function can-dom-mutate.dispatchNodeInsertion dispatchNodeInsertion\n\t* @hide\n\t*\n\t* Dispatch an insertion mutation on the given node.\n\t*\n\t* @signature `dispatchNodeInsertion( node [, callback ] )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} node The node on which to dispatch an insertion mutation.\n\t*/\n\tdispatchNodeInsertion: function (node, target) {\n\t\tqueue.enqueueMutationsAndFlushAsync(\n\t\t\t[{\n\t\t\t\ttype: \"childList\",\n\t\t\t\ttarget: target,\n\t\t\t\taddedNodes: [node],\n\t\t\t\tisConnected: canDomMutate_2_0_9_IsConnected.isConnected(target),\n\t\t\t\tremovedNodes: []\n\t\t\t}]\n\t\t);\n\t\t/*\n\t\tvar nodes = new Set();\n\t\tutil.addToSet( getAllNodes(node), nodes);\n\t\tvar events = toMutationEvents( canReflect.toArray(nodes) );\n\t\t// this is basically an array of every single child of node including node\n\t\tdispatchInsertion(events, callback, dispatchConnected, flushAsync);*/\n\t},\n\n\t/**\n\t* @function can-dom-mutate.dispatchNodeRemoval dispatchNodeRemoval\n\t* @hide\n\t*\n\t* Dispatch a removal mutation on the given node.\n\t*\n\t* @signature `dispatchNodeRemoval( node [, callback ] )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} node The node on which to dispatch a removal mutation.\n\t* @param {function} callback The optional callback called after the mutation is dispatched.\n\t*/\n\tdispatchNodeRemoval: function (node, target) {\n\t\tqueue.enqueueMutationsAndFlushAsync(\n\t\t\t[{\n\t\t\t\ttype: \"childList\",\n\t\t\t\ttarget: target,\n\t\t\t\taddedNodes: [],\n\t\t\t\tremovedNodes: [node],\n\t\t\t\tisConnected: canDomMutate_2_0_9_IsConnected.isConnected(target)\n\t\t\t}]\n\t\t);\n\t\t/*\n\t\tvar nodes = new Set();\n\t\tutil.addToSet( getAllNodes(node), nodes);\n\t\tvar events = toMutationEvents( canReflect.toArray(nodes) );\n\t\tdispatchRemoval(events, callback, dispatchConnected, flushAsync);*/\n\t},\n\n\t/**\n\t* @function can-dom-mutate.dispatchNodeAttributeChange dispatchNodeAttributeChange\n\t* @parent can-dom-mutate.static\n\t* @hide\n\t*\n\t* Dispatch an attribute change mutation on the given node.\n\t*\n\t* @signature `dispatchNodeAttributeChange( node, attributeName, oldValue [, callback ] )`\n\t*\n\t* ```\n\t* input.setAttribute(\"value\", \"newValue\")\n\t* domMutate.dispatchNodeAttributeChange(input, \"value\",\"oldValue\")\n\t* ```\n\t*\n\t*\n\t* @param {Node} target The node on which to dispatch an attribute change mutation.\n\t* @param {String} attributeName The attribute name whose value has changed.\n\t* @param {String} oldValue The attribute value before the change.\n\t*/\n\tdispatchNodeAttributeChange: function (target, attributeName, oldValue) {\n\t\tqueue.enqueueMutationsAndFlushAsync(\n\t\t\t[{\n\t\t\t\ttype: \"attributes\",\n\t\t\t\ttarget: target,\n\t\t\t\tattributeName: attributeName,\n\t\t\t\toldValue: oldValue\n\t\t\t}]\n\t\t);\n\t},\n\n\t/**\n\t* @function can-dom-mutate.onNodeConnected onNodeConnected\n\t*\n\t* Listen for insertion mutations on the given node.\n\t*\n\t* @signature `onNodeConnected( node, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} node The node on which to listen for insertion mutations.\n\t* @param {function} callback The callback called when an insertion mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonNodeConnected: addNodeConnectedListener,\n\tonNodeInsertion: function(){\n\t\t// TODO: remove in prod\n\t\tconsole.warn(\"can-dom-mutate: Use onNodeConnected instead of onNodeInsertion\");\n\t\treturn addNodeConnectedListener.apply(this, arguments);\n\t},\n\t/**\n\t* @function can-dom-mutate.onNodeDisconnected onNodeDisconnected\n\t*\n\t* Listen for removal mutations on the given node.\n\t*\n\t* @signature `onNodeDisconnected( node, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} node The node on which to listen for removal mutations.\n\t* @param {function} callback The callback called when a removal mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonNodeDisconnected: addNodeDisconnectedListener,\n\tonNodeRemoval: function(){\n\t\t// TODO: remove in prod\n\t\tconsole.warn(\"can-dom-mutate: Use onNodeDisconnected instead of onNodeRemoval\");\n\t\treturn addNodeDisconnectedListener.apply(this, arguments);\n\t},\n\t/**\n\t* @function can-dom-mutate.onNodeAttributeChange onNodeAttributeChange\n\t*\n\t* Listen for attribute change mutations on the given node.\n\t*\n\t* @signature `onNodeAttributeChange( node, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} node The node on which to listen for attribute change mutations.\n\t* @param {function} callback The callback called when an attribute change mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonNodeAttributeChange: addNodeAttributeChangeListener,\n\n\t/**\n\t* @function can-dom-mutate.onDisconnected onDisconnected\n\t*\n\t* Listen for removal mutations on any node within the documentElement.\n\t*\n\t* @signature `onDisconnected( documentElement, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} documentElement The documentElement on which to listen for removal mutations.\n\t* @param {function} callback The callback called when a removal mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonDisconnected: addDisconnectedListener,\n\tonRemoval: function(){\n\t\t// TODO: remove in prod\n\t\tconsole.warn(\"can-dom-mutate: Use onDisconnected instead of onRemoval\");\n\t\treturn addDisconnectedListener.apply(this, arguments);\n\t},\n\t/**\n\t* @function can-dom-mutate.onConnected onConnected\n\t*\n\t* Listen for insertion mutations on any node within the documentElement.\n\t*\n\t* @signature `onConnected( documentElement, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} documentElement The documentElement on which to listen for removal mutations.\n\t* @param {function} callback The callback called when a insertion mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonConnected: addConnectedListener,\n\tonInsertion: function(){\n\t\t// TODO: remove in prod\n\t\tconsole.warn(\"can-dom-mutate: Use onConnected instead of onInsertion\");\n\t\treturn addConnectedListener.apply(this, arguments);\n\t},\n\t/**\n\t* @function can-dom-mutate.onAttributeChange onAttributeChange\n\t*\n\t* Listen for attribute change mutations on any node within the documentElement.\n\t*\n\t* @signature `onAttributeChange( documentElement, callback )`\n\t* @parent can-dom-mutate.static\n\t* @param {Node} documentElement The documentElement on which to listen for removal mutations.\n\t* @param {function} callback The callback called when an attribute change mutation is dispatched.\n\t* @return {function} The callback to remove the mutation listener.\n\t*/\n\tonAttributeChange: addAttributeChangeListener,\n\n\tflushRecords: function(doc){\n\t\tdoc = doc || document$1();\n\t\tvar data = dataStore.get(doc),\n\t\t\trecords = [];\n\t\tif(data) {\n\t\t\tif(data.domMutationTreeData && data.domMutationTreeData.observer) {\n\t\t\t\trecords = data.domMutationTreeData.observer.takeRecords();\n\t\t\t}\n\t\t}\n\t\tqueue.enqueueAndFlushMutations(records);\n\t},\n\tonNodeInserted: addNodeInsertedListener,\n\tonNodeRemoved: addNodeRemovedListener\n};\n\n//!steal-remove-start\nif(process.env.NODE_ENV !== \"production\") {\n\tdomMutate.dataStore = dataStore;\n}\n//!steal-remove-end\n\nvar canDomMutate_2_0_9_canDomMutate = canNamespace_1_0_0_canNamespace.domMutate = domMutate;\n\nvar getParents$1 = canDomMutate_2_0_9_Util.getParents;\n\n\n\nvar compat = {\n\treplaceChild: function (newChild, oldChild) {\n\t\tvar newChildren = getParents$1(newChild);\n\t\tvar result = this.replaceChild(newChild, oldChild);\n\t\tcanDomMutate_2_0_9_canDomMutate.dispatchNodeRemoval(oldChild, this);\n\t\tfor (var i = 0; i < newChildren.length; i++) {\n\t\t\tcanDomMutate_2_0_9_canDomMutate.dispatchNodeInsertion(newChildren[i], this);\n\t\t}\n\t\treturn result;\n\t},\n\tsetAttribute: function (name, value) {\n\t\tvar oldAttributeValue = this.getAttribute(name);\n\t\tvar result = this.setAttribute(name, value);\n\t\tvar newAttributeValue = this.getAttribute(name);\n\t\tif (oldAttributeValue !== newAttributeValue) {\n\t\t\tcanDomMutate_2_0_9_canDomMutate.dispatchNodeAttributeChange(this, name, oldAttributeValue);\n\t\t}\n\t\treturn result;\n\t},\n\tsetAttributeNS: function (namespace, name, value) {\n\t\tvar oldAttributeValue = this.getAttribute(name);\n\t\tvar result = this.setAttributeNS(namespace, name, value);\n\t\tvar newAttributeValue = this.getAttribute(name);\n\t\tif (oldAttributeValue !== newAttributeValue) {\n\t\t\tcanDomMutate_2_0_9_canDomMutate.dispatchNodeAttributeChange(this, name, oldAttributeValue);\n\t\t}\n\t\treturn result;\n\t},\n\tremoveAttribute: function (name) {\n\t\tvar oldAttributeValue = this.getAttribute(name);\n\t\tvar result = this.removeAttribute(name);\n\t\tif (oldAttributeValue) {\n\t\t\tcanDomMutate_2_0_9_canDomMutate.dispatchNodeAttributeChange(this, name, oldAttributeValue);\n\t\t}\n\t\treturn result;\n\t}\n};\n\nvar compatData = [\n\t['appendChild', 'Insertion'],\n\t['insertBefore', 'Insertion'],\n\t['removeChild', 'Removal']\n];\ncompatData.forEach(function (pair) {\n\tvar nodeMethod = pair[0];\n\tvar dispatchMethod = 'dispatchNode' + pair[1];\n\tcompat[nodeMethod] = function (node) {\n\t\tvar nodes = getParents$1(node);\n\t\tvar result = this[nodeMethod].apply(this, arguments);\n\t\tfor (var i = 0; i < nodes.length; i++) {\n\t\t\tcanDomMutate_2_0_9_canDomMutate[dispatchMethod](nodes[i], this);\n\t\t}\n\t\treturn result;\n\t};\n});\n\nvar normal = {};\nvar nodeMethods = ['appendChild', 'insertBefore', 'removeChild', 'replaceChild', 'setAttribute', 'setAttributeNS', 'removeAttribute'];\nnodeMethods.forEach(function (methodName) {\n\tnormal[methodName] = function () {\n\t\tif(canDomMutate_2_0_9_IsConnected.isConnected(this)) {\n\t\t\treturn this[methodName].apply(this, arguments);\n\t\t} else {\n\t\t\treturn compat[methodName].apply(this, arguments);\n\t\t}\n\t};\n});\n\n/**\n* @module {{}} can-dom-mutate/node node\n* @parent can-dom-mutate/modules\n*\n* Append, insert, and remove DOM nodes. Also, change node attributes.\n* This allows mutations to be dispatched in environments where MutationObserver is not supported.\n* @signature `mutateNode`\n*\n* Exports an `Object` with methods that shouhld be used to mutate HTML.\n*\n* ```js\n* var mutateNode = require('can-dom-mutate/node');\n* var el = document.createElement('div');\n*\n* mutateNode.appendChild.call(document.body, el);\n*\n* ```\n*/\nvar mutate$1 = {};\n\n/**\n* @function can-dom-mutate/node.appendChild appendChild\n* @parent can-dom-mutate/node\n*\n* Append a node to an element, effectively `Node.prototype.appendChild`.\n*\n* @signature `mutate.appendChild.call(parent, child)`\n*\n* @param {Node} parent The parent into which the child is inserted.\n* @param {Node} child The child which will be inserted into the parent.\n* @return {Node} The appended child.\n*/\n\n/**\n* @function can-dom-mutate/node.insertBefore insertBefore\n* @parent can-dom-mutate/node\n*\n* Insert a node before a given reference node in an element, effectively `Node.prototype.insertBefore`.\n*\n* @signature `mutate.insertBefore.call(parent, child, reference)`\n* @param {Node} parent The parent into which the child is inserted.\n* @param {Node} child The child which will be inserted into the parent.\n* @param {Node} reference The reference which the child will be placed before.\n* @return {Node} The inserted child.\n*/\n\n/**\n* @function can-dom-mutate/node.removeChild removeChild\n* @parent can-dom-mutate/node\n*\n* Remove a node from an element, effectively `Node.prototype.removeChild`.\n*\n* @signature `mutate.removeChild.call(parent, child)`\n*\n* @param {Node} parent The parent from which the child is removed.\n* @param {Node} child The child which will be removed from the parent.\n* @return {Node} The removed child.\n*/\n\n/**\n* @function can-dom-mutate/node.replaceChild replaceChild\n* @parent can-dom-mutate/node\n*\n* Insert a node before a given reference node in an element, effectively `Node.prototype.replaceChild`.\n*\n* @signature `mutate.replaceChild.call(parent, newChild, oldChild)`\n*\n* @param {Node} parent The parent into which the newChild is inserted.\n* @param {Node} newChild The child which is inserted into the parent.\n* @param {Node} oldChild The child which is removed from the parent.\n* @return {Node} The replaced child.\n*/\n\n/**\n* @function can-dom-mutate/node.setAttribute setAttribute\n* @parent can-dom-mutate/node\n*\n* Set an attribute value on an element, effectively `Element.prototype.setAttribute`.\n*\n* @signature `mutate.setAttribute.call(element, name, value)`\n*\n* @param {Element} element The element on which to set the attribute.\n* @param {String} name The name of the attribute to set.\n* @param {String} value The value to set on the attribute.\n*/\n\n/**\n* @function can-dom-mutate/node.removeAttribute removeAttribute\n* @parent can-dom-mutate/node\n*\n* Removes an attribute from an element, effectively `Element.prototype.removeAttribute`.\n*\n* @signature `mutate.removeAttribute.call(element, name, value)`\n*\n* @param {Element} element The element from which to remove the attribute.\n* @param {String} name The name of the attribute to remove.\n*/\n\nfunction setMutateStrategy(observer) {\n\tvar strategy = observer ? normal : compat;\n\n\tfor (var key in strategy) {\n\t\tmutate$1[key] = strategy[key];\n\t}\n}\n\nvar mutationObserverKey = 'MutationObserver';\nsetMutateStrategy(canGlobals_1_2_2_canGlobals.getKeyValue(mutationObserverKey));\ncanGlobals_1_2_2_canGlobals.onKeyValue(mutationObserverKey, setMutateStrategy);\n\nvar node = canNamespace_1_0_0_canNamespace.domMutateNode = canDomMutate_2_0_9_canDomMutate.node = mutate$1;\n\n// backwards compatibility\nvar canDomMutate_2_0_9_node = canNamespace_1_0_0_canNamespace.node = node;\n\n/**\n * @module {function} can-child-nodes\n * @parent can-dom-utilities\n * @collection can-infrastructure\n * @package ./package.json\n * \n * @signature `childNodes(node)`\n *\n * Get all of the childNodes of a given node.\n *\n * ```js\n * var stache = require(\"can-stache\");\n * var childNodes = require(\"can-util/child-nodes/child-nodes\");\n *\n * var html = \"
\";\n * var frag = stache(html)();\n *\n * console.log(childNodes(frag)[0].nodeName); // -> DIV\n * ```\n *\n * @param {Object} node The Node that you want child nodes for.\n */\n\nfunction childNodes(node) {\n\tvar childNodes = node.childNodes;\n\tif (\"length\" in childNodes) {\n\t\treturn childNodes;\n\t} else {\n\t\tvar cur = node.firstChild;\n\t\tvar nodes = [];\n\t\twhile (cur) {\n\t\t\tnodes.push(cur);\n\t\t\tcur = cur.nextSibling;\n\t\t}\n\t\treturn nodes;\n\t}\n}\n\nvar canChildNodes_1_2_1_canChildNodes = canNamespace_1_0_0_canNamespace.childNodes = childNodes;\n\n/**\n@module {function} can-fragment\n@parent can-dom-utilities\n@collection can-infrastructure\n@package ./package.json\n\nConvert a String, HTMLElement, documentFragment, contentArray, or object with a `can.toDOM` symbol into a documentFragment.\n\n@signature `fragment(item, doc)`\n\n@param {String|HTMLElement|documentFragment|contentArray} item\n@param {Document} doc an optional DOM document in which to build the fragment\n\n@return {documentFragment}\n\n@body\n\n## Use\n\nContentArrays can be used to combine multiple HTMLElements into a single document fragment. For example:\n\n var fragment = require(\"can-fragment\");\n\n var p = document.createElement(\"p\");\n p.innerHTML = \"Welcome to CanJS\";\n var contentArray = [\"
Hi There
\", p];\n var fragment = fragment( contentArray )\n\n`fragment` will be a documentFragment with the following elements:\n\n
` tags when `innerHTML`\n\t// is called on a `tbody`. To get around this, we construct a\n\t// valid table with a `tbody` that has the `innerHTML` we want.\n\t// Then the container is the `firstChild` of the `tbody`.\n\t// [source](http://www.ericvasilik.com/2006/07/code-karma.html).\n\tif (name === 'tbody' || name === 'tfoot' || name === 'thead' || name === 'colgroup') {\n\t\ttemp.innerHTML = '
';\n\t\tcontainer = temp.firstChild.nodeType === 3 ? temp.lastChild : temp.firstChild.firstChild.firstChild;\n\t} else if (name === 'option') {\n\t\ttemp.innerHTML = '';\n\t\tcontainer = temp.firstChild.nodeType === 3 ? temp.lastChild : temp.firstChild;\n\t} else {\n\t\tcontainer.innerHTML = '' + html;\n\t}\n\n\treturn [].slice.call(canChildNodes_1_2_1_canChildNodes(container));\n}\n\nfunction fragment(html, doc) {\n\tif (html && html.nodeType === 11) {\n\t\treturn html;\n\t}\n\tif (!doc) {\n\t\tdoc = document$1();\n\t} else if (doc.length) {\n\t\tdoc = doc[0];\n\t}\n\n\tvar parts = makeFragment(html, undefined, doc),\n\t\tfrag = (doc || document).createDocumentFragment();\n\tfor (var i = 0, length = parts.length; i < length; i++) {\n\t\tfrag.appendChild(parts[i]);\n\t}\n\treturn frag;\n}\n\nvar makeFrag = function(item, doc) {\n\tvar document = doc || document$1();\n\tvar frag;\n\tif (!item || typeof item === \"string\") {\n\t\tfrag = fragment(item == null ? \"\" : \"\" + item, document);\n\t\t// If we have an empty frag...\n\t} else if(typeof item[toDOMSymbol] === \"function\") {\n\t\treturn makeFrag(item[toDOMSymbol]());\n\t}\n\telse if (item.nodeType === 11) {\n\t\treturn item;\n\t} else if (typeof item.nodeType === \"number\") {\n\t\tfrag = document.createDocumentFragment();\n\t\tfrag.appendChild(item);\n\t\treturn frag;\n\t} else if (canReflect_1_19_2_canReflect.isListLike(item)) {\n\t\tfrag = document.createDocumentFragment();\n\t\tcanReflect_1_19_2_canReflect.eachIndex(item, function(item) {\n\t\t\tfrag.appendChild(makeFrag(item));\n\t\t});\n\t} else {\n\t\tfrag = fragment(\"\" + item, document);\n\t}\n if (!canChildNodes_1_2_1_canChildNodes(frag).length) {\n frag.appendChild(document.createTextNode(''));\n }\n return frag;\n};\n\nvar canFragment_1_3_1_canFragment = canNamespace_1_0_0_canNamespace.fragment = canNamespace_1_0_0_canNamespace.frag = makeFrag;\n\nvar canViewCallbacks_5_0_0_canViewCallbacks = createCommonjsModule(function (module) {\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar callbackMapSymbol = canSymbol_1_7_0_canSymbol.for('can.callbackMap');\nvar initializeSymbol = canSymbol_1_7_0_canSymbol.for('can.initialize');\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tvar requestedAttributes = {};\n}\n//!steal-remove-end\n\nvar tags = {};\n\n// WeakSet containing elements that have been rendered already\n// and therefore do not need to be rendered again\n\nvar automountEnabled = function(){\n\tvar document = canGlobals_1_2_2_canGlobals.getKeyValue(\"document\");\n\tif(document == null || document.documentElement == null) {\n\t\treturn false;\n\t}\n\treturn document.documentElement.getAttribute(\"data-can-automount\") !== \"false\";\n};\n\nvar renderedElements = new WeakMap();\n\nvar mountElement = function (node) {\n\tvar tagName = node.tagName && node.tagName.toLowerCase();\n\tvar tagHandler = tags[tagName];\n\n\t// skip elements that already have a viewmodel or elements whose tags don't match a registered tag\n\t// or elements that have already been rendered\n\tif (tagHandler) {\n\t\tcallbacks.tagHandler(node, tagName, {});\n\t}\n};\n\nvar mutationObserverEnabled = false;\nvar disableMutationObserver;\nvar enableMutationObserver = function() {\n\tvar docEl = document$1().documentElement;\n\n\tif (mutationObserverEnabled) {\n\t\tif (mutationObserverEnabled === docEl) {\n\t\t\treturn;\n\t\t}\n\t\t// if the document has changed, re-enable mutationObserver\n\t\tdisableMutationObserver();\n\t}\n\n\tvar undoOnInsertionHandler = canDomMutate_2_0_9_canDomMutate.onConnected(docEl, function(mutation) {\n\t\tmountElement(mutation.target);\n\t});\n\tmutationObserverEnabled = true;\n\n\tdisableMutationObserver = function() {\n\t\tundoOnInsertionHandler();\n\t\tmutationObserverEnabled = false;\n\t};\n};\n\nvar renderTagsInDocument = function(tagName) {\n\tvar nodes = document$1().getElementsByTagName(tagName);\n\n\tfor (var i=0, node; (node = nodes[i]) !== undefined; i++) {\n\t\tmountElement(node);\n\t}\n};\n\nvar attr = function (attributeName, attrHandler) {\n\tif(attrHandler) {\n\t\tif (typeof attributeName === \"string\") {\n\t\t\tattributes[attributeName] = attrHandler;\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tif(requestedAttributes[attributeName]) {\n\t\t\t\t\tdev.warn(\"can-view-callbacks: \" + attributeName+ \" custom attribute behavior requested before it was defined. Make sure \"+attributeName+\" is defined before it is needed.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t} else {\n\t\t\tregExpAttributes.push({\n\t\t\t\tmatch: attributeName,\n\t\t\t\thandler: attrHandler\n\t\t\t});\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tObject.keys(requestedAttributes).forEach(function(requested){\n\t\t\t\t\tif(attributeName.test(requested)) {\n\t\t\t\t\t\tdev.warn(\"can-view-callbacks: \" + requested+ \" custom attribute behavior requested before it was defined. Make sure \"+requested+\" is defined before it is needed.\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t}\n\t} else {\n\t\tvar cb = attributes[attributeName];\n\t\tif( !cb ) {\n\n\t\t\tfor( var i = 0, len = regExpAttributes.length; i < len; i++) {\n\t\t\t\tvar attrMatcher = regExpAttributes[i];\n\t\t\t\tif(attrMatcher.match.test(attributeName)) {\n\t\t\t\t\treturn attrMatcher.handler;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\trequestedAttributes[attributeName] = true;\n\t\t}\n\t\t//!steal-remove-end\n\n\t\treturn cb;\n\t}\n};\n\nvar attrs = function(attrMap) {\n\tvar map = canReflect_1_19_2_canReflect.getKeyValue(attrMap, callbackMapSymbol) || attrMap;\n\n\t// Only add bindings once.\n\tif(attrMaps.has(map)) {\n\t\treturn;\n\t} else {\n\t\t// Would prefer to use WeakSet but IE11 doesn't support it.\n\t\tattrMaps.set(map, true);\n\t}\n\n\tcanReflect_1_19_2_canReflect.eachKey(map, function(callback, exp){\n\t\tattr(exp, callback);\n\t});\n};\n\nvar attributes = {},\n\tregExpAttributes = [],\n\tattrMaps = new WeakMap(),\n\tautomaticCustomElementCharacters = /[-\\:]/;\nvar defaultCallback = function () {};\n\nvar tag = function (tagName, tagHandler) {\n\tif(tagHandler) {\n\t\tvar validCustomElementName = automaticCustomElementCharacters.test(tagName),\n\t\t\ttagExists = typeof tags[tagName.toLowerCase()] !== 'undefined',\n\t\t\tcustomElementExists;\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (tagExists) {\n\t\t\t\tdev.warn(\"Custom tag: \" + tagName.toLowerCase() + \" is already defined\");\n\t\t\t}\n\n\t\t\tif (!validCustomElementName && tagName !== \"content\") {\n\t\t\t\tdev.warn(\"Custom tag: \" + tagName.toLowerCase() + \" hyphen missed\");\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\ttags[tagName.toLowerCase()] = tagHandler;\n\n\t\tif(automountEnabled()) {\n\t\t\tvar customElements = canGlobals_1_2_2_canGlobals.getKeyValue(\"customElements\");\n\n\t\t\t// automatically render elements that have tagHandlers\n\t\t\t// If browser supports customElements, register the tag as a custom element\n\t\t\tif (customElements) {\n\t\t\t\tcustomElementExists = customElements.get(tagName.toLowerCase());\n\n\t\t\t\tif (validCustomElementName && !customElementExists) {\n\t\t\t\t\tvar CustomElement = function() {\n\t\t\t\t\t\treturn Reflect.construct(HTMLElement, [], CustomElement);\n\t\t\t\t\t};\n\n\t\t\t\t\tCustomElement.prototype = Object.create(HTMLElement.prototype);\n\t\t\t\t\tCustomElement.prototype.constructor = CustomElement;\n\n\t\t\t\t\tCustomElement.prototype.connectedCallback = function() {\n\t\t\t\t\t\tcallbacks.tagHandler(this, tagName.toLowerCase(), {});\n\t\t\t\t\t};\n\n\t\t\t\t\tcustomElements.define(tagName, CustomElement);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If browser doesn't support customElements, set up MutationObserver for\n\t\t\t// rendering elements when they are inserted in the page\n\t\t\t// and rendering elements that are already in the page\n\t\t\telse {\n\t\t\t\tenableMutationObserver();\n\t\t\t\trenderTagsInDocument(tagName);\n\t\t\t}\n\t\t} else if(mutationObserverEnabled) {\n\t\t\tdisableMutationObserver();\n\t\t}\n\t} else {\n\t\tvar cb;\n\n\t\t// if null is passed as tagHandler, remove tag\n\t\tif (tagHandler === null) {\n\t\t\tdelete tags[tagName.toLowerCase()];\n\t\t} else {\n\t\t\tcb = tags[tagName.toLowerCase()];\n\t\t}\n\n\t\tif(!cb && automaticCustomElementCharacters.test(tagName)) {\n\t\t\t// empty callback for things that look like special tags\n\t\t\tcb = defaultCallback;\n\t\t}\n\t\treturn cb;\n\t}\n\n};\n\nvar callbacks = {\n\t_tags: tags,\n\t_attributes: attributes,\n\t_regExpAttributes: regExpAttributes,\n\tdefaultCallback: defaultCallback,\n\ttag: tag,\n\tattr: attr,\n\tattrs: attrs,\n\t// handles calling back a tag callback\n\ttagHandler: function(el, tagName, tagData){\n\t\t// skip elements that have already been rendered\n\t\tif (renderedElements.has(el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar scope = tagData.scope,\n\t\t\thelperTagCallback = scope && scope.templateContext.tags.get(tagName),\n\t\t\ttagCallback = helperTagCallback || tags[tagName] || el[initializeSymbol],\n\t\t\tres;\n\n\t\t// If this was an element like that doesn't have a component, just render its content\n\t\tif(tagCallback) {\n\t\t\tres = canObservationRecorder_1_3_1_canObservationRecorder.ignore(tagCallback)(el, tagData);\n\n\t\t\t// add the element to the Set of elements that have had their handlers called\n\t\t\t// this will prevent the handler from being called again when the element is inserted\n\t\t\trenderedElements.set(el, true);\n\t\t} else {\n\t\t\tres = scope;\n\t\t}\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (!tagCallback) {\n\t\t\t\tvar GLOBAL = global_1();\n\t\t\t\tvar ceConstructor = document$1().createElement(tagName).constructor;\n\t\t\t\t// If not registered as a custom element, the browser will use default constructors\n\t\t\t\tif (ceConstructor === GLOBAL.HTMLElement || ceConstructor === GLOBAL.HTMLUnknownElement) {\n\t\t\t\t\tdev.warn('can-view-callbacks: No custom element found for ' + tagName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\t// If the tagCallback gave us something to render with, and there is content within that element\n\t\t// render it!\n\t\tif (res && tagData.subtemplate) {\n\t\t\tif (scope !== res) {\n\t\t\t\tscope = scope.add(res);\n\t\t\t}\n\n\t\t\t//var nodeList = nodeLists.register([], undefined, tagData.parentNodeList || true, false);\n\t\t\t//nodeList.expression = \"<\" + el.tagName + \">\";\n\n\t\t\tvar result = tagData.subtemplate(scope, tagData.options);\n\t\t\tvar frag = typeof result === \"string\" ? canFragment_1_3_1_canFragment(result) : result;\n\t\t\tcanDomMutate_2_0_9_node.appendChild.call(el, frag);\n\t\t}\n\t}\n};\n\ncanNamespace_1_0_0_canNamespace.view = canNamespace_1_0_0_canNamespace.view || {};\n\nif (canNamespace_1_0_0_canNamespace.view.callbacks) {\n\tthrow new Error(\"You can't have two versions of can-view-callbacks, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.view.callbacks = callbacks;\n}\n});\n\n/* jshint maxdepth:7 */\n/* jshint latedef:false */\n\n\n\n\n\n// if an object or a function\n// convert into what it should look like\n// then the modification can happen in place\n// but it has to have more than the current node\n// blah!\nvar processNodes = function(nodes, paths, location, document){\n\tvar frag = document.createDocumentFragment();\n\n\tfor(var i = 0, len = nodes.length; i < len; i++) {\n\t\tvar node = nodes[i];\n\t\tfrag.appendChild( processNode(node,paths,location.concat(i), document) );\n\t}\n\treturn frag;\n},\n\tkeepsTextNodes = typeof document !== \"undefined\" && (function(){\n\t\tvar testFrag = document.createDocumentFragment();\n\t\tvar div = document.createElement(\"div\");\n\n\t\tdiv.appendChild(document.createTextNode(\"\"));\n\t\tdiv.appendChild(document.createTextNode(\"\"));\n\t\ttestFrag.appendChild(div);\n\n\t\tvar cloned = testFrag.cloneNode(true);\n\n\t\treturn cloned.firstChild.childNodes.length === 2;\n\t})(),\n\tclonesWork = typeof document !== \"undefined\" && (function(){\n\t\t// Since html5shiv is required to support custom elements, assume cloning\n\t\t// works in any browser that doesn't have html5shiv\n\n\t\t// Clone an element containing a custom tag to see if the innerHTML is what we\n\t\t// expect it to be, or if not it probably was created outside of the document's\n\t\t// namespace.\n\t\tvar el = document.createElement('a');\n\t\tel.innerHTML = \"\";\n\t\tvar clone = el.cloneNode(true);\n\t\tvar works = clone.innerHTML === \"\";\n\t\tvar MO, observer;\n\n\t\tif(works) {\n\t\t\t// Cloning text nodes with dashes seems to create multiple nodes in IE11 when\n\t\t\t// MutationObservers of subtree modifications are used on the documentElement.\n\t\t\t// Since this is not what we expect we have to include detecting it here as well.\n\t\t\tel = document.createDocumentFragment();\n\t\t\tel.appendChild(document.createTextNode('foo-bar'));\n\n\t\t\tMO = mutationObserver();\n\n\t\t\tif (MO) {\n\t\t\t\tobserver = new MO(function() {});\n\t\t\t\tobserver.observe(document.documentElement, { childList: true, subtree: true });\n\n\t\t\t\tclone = el.cloneNode(true);\n\n\t\t\t\tobserver.disconnect();\n\t\t\t} else {\n\t\t\t\tclone = el.cloneNode(true);\n\t\t\t}\n\n\t\t\treturn clone.childNodes.length === 1;\n\t\t}\n\n\t\treturn works;\n\t})(),\n\tnamespacesWork = typeof document !== \"undefined\" && !!document.createElementNS;\n\n/**\n * @function cloneNode\n * @hide\n *\n * A custom cloneNode function to be used in browsers that properly support cloning\n * of custom tags (IE8 for example). Fixes it by doing some manual cloning that\n * uses innerHTML instead, which has been shimmed.\n *\n * @param {DocumentFragment} frag A document fragment to clone\n * @return {DocumentFragment} a new fragment that is a clone of the provided argument\n */\nvar cloneNode = clonesWork ?\n\tfunction(el){\n\t\treturn el.cloneNode(true);\n\t} :\n\tfunction(node){\n\t\tvar document = node.ownerDocument;\n\t\tvar copy;\n\n\t\tif(node.nodeType === 1) {\n\t\t\tif(node.namespaceURI !== 'http://www.w3.org/1999/xhtml' && namespacesWork && document.createElementNS) {\n\t\t\t\tcopy = document.createElementNS(node.namespaceURI, node.nodeName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcopy = document.createElement(node.nodeName);\n\t\t\t}\n\t\t} else if(node.nodeType === 3){\n\t\t\tcopy = document.createTextNode(node.nodeValue);\n\t\t} else if(node.nodeType === 8) {\n\t\t\tcopy = document.createComment(node.nodeValue);\n\t\t} else if(node.nodeType === 11) {\n\t\t\tcopy = document.createDocumentFragment();\n\t\t}\n\n\t\tif(node.attributes) {\n\t\t\tvar attributes = node.attributes;\n\t\t\tfor (var i = 0; i < attributes.length; i++) {\n\t\t\t\tvar attribute = attributes[i];\n\t\t\t\tif (attribute && attribute.specified) {\n\t\t\t\t\t// If the attribute has a namespace set the namespace \n\t\t\t\t\t// otherwise it will be set to null\n\t\t\t\t\tif (attribute.namespaceURI) {\n\t\t\t\t\t\tcopy.setAttributeNS(attribute.namespaceURI, attribute.nodeName || attribute.name, attribute.nodeValue || attribute.value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcopy.setAttribute(attribute.nodeName || attribute.name, attribute.nodeValue || attribute.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(node && node.firstChild) {\n\t\t\tvar child = node.firstChild;\n\n\t\t\twhile(child) {\n\t\t\t\tcopy.appendChild( cloneNode(child) );\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t}\n\n\t\treturn copy;\n\t};\n\nfunction processNode(node, paths, location, document){\n\tvar callback,\n\t\tloc = location,\n\t\tnodeType = typeof node,\n\t\tel,\n\t\tp,\n\t\ti , len;\n\tvar getCallback = function(){\n\t\tif(!callback) {\n\t\t\tcallback = {\n\t\t\t\tpath: location,\n\t\t\t\tcallbacks: []\n\t\t\t};\n\t\t\tpaths.push(callback);\n\t\t\tloc = [];\n\t\t}\n\t\treturn callback;\n\t};\n\n\tif(nodeType === \"object\") {\n\t\tif( node.tag ) {\n\t\t\tif(namespacesWork && node.namespace) {\n\t\t\t\tel = document.createElementNS(node.namespace, node.tag);\n\t\t\t} else {\n\t\t\t\tel = document.createElement(node.tag);\n\t\t\t}\n\n\t\t\tif(node.attrs) {\n\t\t\t\tfor(var attrName in node.attrs) {\n\t\t\t\t\tvar value = node.attrs[attrName];\n\t\t\t\t\tif(typeof value === \"function\"){\n\t\t\t\t\t\tgetCallback().callbacks.push({\n\t\t\t\t\t\t\tcallback: value\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (value !== null && typeof value === \"object\" && value.namespaceURI) {\n\t\t\t\t\t\tel.setAttributeNS(value.namespaceURI,attrName,value.value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(el, attrName, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.attributes) {\n\t\t\t\tfor(i = 0, len = node.attributes.length; i < len; i++ ) {\n\t\t\t\t\tgetCallback().callbacks.push({callback: node.attributes[i]});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.children && node.children.length) {\n\t\t\t\t// add paths\n\t\t\t\tif(callback) {\n\t\t\t\t\tp = callback.paths = [];\n\t\t\t\t} else {\n\t\t\t\t\tp = paths;\n\t\t\t\t}\n\n\t\t\t\tel.appendChild( processNodes(node.children, p, loc, document) );\n\t\t\t}\n\t\t} else if(node.comment) {\n\t\t\tel = document.createComment(node.comment);\n\n\t\t\tif(node.callbacks) {\n\t\t\t\tfor(i = 0, len = node.callbacks.length; i < len; i++ ) {\n\t\t\t\t\tgetCallback().callbacks.push({callback: node.callbacks[i]});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t} else if(nodeType === \"string\"){\n\n\t\tel = document.createTextNode(node);\n\n\t} else if(nodeType === \"function\") {\n\n\t\tif(keepsTextNodes) {\n\t\t\tel = document.createTextNode(\"\");\n\t\t\tgetCallback().callbacks.push({\n\t\t\t\tcallback: node\n\t\t\t});\n\t\t} else {\n\t\t\tel = document.createComment(\"~\");\n\t\t\tgetCallback().callbacks.push({\n\t\t\t\tcallback: function(){\n\t\t\t\t\tvar el = document.createTextNode(\"\");\n\t\t\t\t\tcanDomMutate_2_0_9_node.replaceChild.call(this.parentNode, el, this);\n\t\t\t\t\treturn node.apply(el,arguments );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t}\n\treturn el;\n}\n\nfunction getCallbacks(el, pathData, elementCallbacks){\n\tvar path = pathData.path,\n\t\tcallbacks = pathData.callbacks,\n\t\tpaths = pathData.paths,\n\t\tchild = el,\n\t\tpathLength = path ? path.length : 0,\n\t\tpathsLength = paths ? paths.length : 0;\n\n\tfor(var i = 0; i < pathLength; i++) {\n\t\tchild = child.childNodes.item(path[i]);\n\t}\n\n\tfor( i= 0 ; i < pathsLength; i++) {\n\t\tgetCallbacks(child, paths[i], elementCallbacks);\n\t}\n\n\telementCallbacks.push({element: child, callbacks: callbacks});\n}\n\nfunction hydrateCallbacks(callbacks, args) {\n\tvar len = callbacks.length,\n\t\tcallbacksLength,\n\t\tcallbackElement,\n\t\tcallbackData;\n\n\tfor(var i = 0; i < len; i++) {\n\t\tcallbackData = callbacks[i];\n\t\tcallbacksLength = callbackData.callbacks.length;\n\t\tcallbackElement = callbackData.element;\n\t\tfor(var c = 0; c < callbacksLength; c++) {\n\t\t\tcallbackData.callbacks[c].callback.apply(callbackElement, args);\n\t\t}\n\t}\n}\n\nfunction makeTarget(nodes, doc){\n\tvar paths = [];\n\tvar frag = processNodes(nodes, paths, [], doc || document$1());\n\treturn {\n\t\tpaths: paths,\n\t\tclone: frag,\n\t\thydrate: function(){\n\t\t\tvar cloned = cloneNode(this.clone);\n\t\t\tvar args = [];\n\t\t\tfor (var a = 0, ref = args.length = arguments.length; a < ref; a++) {\n\t\t\t\targs[a] = arguments[a];\n\t\t\t} // see https://jsperf.com/nodelist-to-array\n\n\t\t\tvar callbacks = [];\n\t\t\tfor(var i = 0; i < paths.length; i++) {\n\t\t\t\tgetCallbacks(cloned, paths[i], callbacks);\n\t\t\t}\n\t\t\thydrateCallbacks(callbacks, args);\n\n\t\t\treturn cloned;\n\t\t}\n\t};\n}\nmakeTarget.keepsTextNodes = keepsTextNodes;\nmakeTarget.cloneNode = cloneNode;\n\ncanNamespace_1_0_0_canNamespace.view = canNamespace_1_0_0_canNamespace.view || {};\nvar canViewTarget_5_0_0_canViewTarget = canNamespace_1_0_0_canNamespace.view.target = makeTarget;\n\nvar getKeyValueSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.getKeyValue\"),\n\tobserveDataSymbol = canSymbol_1_7_0_canSymbol.for(\"can.meta\");\n\nvar promiseDataPrototype = {\n\tisPending: true,\n\tstate: \"pending\",\n\tisResolved: false,\n\tisRejected: false,\n\tvalue: undefined,\n\treason: undefined\n};\n\nfunction setVirtualProp(promise, property, value) {\n\tvar observeData = promise[observeDataSymbol];\n\tvar old = observeData[property];\n\tobserveData[property] = value;\n\tcanQueues_1_3_2_canQueues.enqueueByQueue(observeData.handlers.getNode([property]), promise, [value,old], function() {\n\t\treturn {};\n\t},[\"Promise\", promise, \"resolved with value\", value, \"and changed virtual property: \"+property]);\n}\n\nfunction initPromise(promise) {\n\tvar observeData = promise[observeDataSymbol];\n\tif(!observeData) {\n\t\tObject.defineProperty(promise, observeDataSymbol, {\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false,\n\t\t\twritable: false,\n\t\t\tvalue: Object.create(promiseDataPrototype)\n\t\t});\n\t\tobserveData = promise[observeDataSymbol];\n\t\tobserveData.handlers = new canKeyTree_1_2_2_canKeyTree([Object, Object, Array]);\n\t}\n\tpromise.then(function(value){\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\tsetVirtualProp(promise, \"isPending\", false);\n\t\tsetVirtualProp(promise, \"isResolved\", true);\n\t\tsetVirtualProp(promise, \"value\", value);\n\t\tsetVirtualProp(promise, \"state\", \"resolved\");\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\t}, function(reason){\n\t\tcanQueues_1_3_2_canQueues.batch.start();\n\t\tsetVirtualProp(promise, \"isPending\", false);\n\t\tsetVirtualProp(promise, \"isRejected\", true);\n\t\tsetVirtualProp(promise, \"reason\", reason);\n\t\tsetVirtualProp(promise, \"state\", \"rejected\");\n\t\tcanQueues_1_3_2_canQueues.batch.stop();\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tdev.error(\"Failed promise:\", reason);\n\t\t}\n\t\t//!steal-remove-end\n\t});\n}\n\nfunction setupPromise(value) {\n\tvar oldPromiseFn;\n\tvar proto = \"getPrototypeOf\" in Object ? Object.getPrototypeOf(value) : value.__proto__; //jshint ignore:line\n\n\tif(value[getKeyValueSymbol$2] && value[observeDataSymbol]) {\n\t\t// promise has already been set up. Don't overwrite.\n\t\treturn;\n\t}\n\n\tif(proto === null || proto === Object.prototype) {\n\t\t// promise type is a plain object or dictionary. Set up object instead of proto.\n\t\tproto = value;\n\n\t\tif(typeof proto.promise === \"function\") {\n\t\t\t// Duck-type identification as a jQuery.Deferred;\n\t\t\t// In that case, the promise() function returns a new object\n\t\t\t// that needs to be decorated.\n\t\t\toldPromiseFn = proto.promise;\n\t\t\tproto.promise = function() {\n\t\t\t\tvar result = oldPromiseFn.call(proto);\n\t\t\t\tsetupPromise(result);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t}\n\n\tcanReflect_1_19_2_canReflect.assignSymbols(proto, {\n\t\t\"can.getKeyValue\": function(key) {\n\t\t\tif(!this[observeDataSymbol]) {\n\t\t\t\tinitPromise(this);\n\t\t\t}\n\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this, key);\n\t\t\tswitch(key) {\n\t\t\t\tcase \"state\":\n\t\t\t\tcase \"isPending\":\n\t\t\t\tcase \"isResolved\":\n\t\t\t\tcase \"isRejected\":\n\t\t\t\tcase \"value\":\n\t\t\t\tcase \"reason\":\n\t\t\t\treturn this[observeDataSymbol][key];\n\t\t\t\tdefault:\n\t\t\t\treturn this[key];\n\t\t\t}\n\t\t},\n\t\t\"can.getValue\": function() {\n\t\t\treturn this[getKeyValueSymbol$2](\"value\");\n\t\t},\n\t\t\"can.isValueLike\": false,\n\t\t\"can.onKeyValue\": function(key, handler, queue) {\n\t\t\tif(!this[observeDataSymbol]) {\n\t\t\t\tinitPromise(this);\n\t\t\t}\n\t\t\tthis[observeDataSymbol].handlers.add([key, queue || \"mutate\", handler]);\n\t\t},\n\t\t\"can.offKeyValue\": function(key, handler, queue) {\n\t\t\tif(!this[observeDataSymbol]) {\n\t\t\t\tinitPromise(this);\n\t\t\t}\n\t\t\tthis[observeDataSymbol].handlers.delete([key, queue || \"mutate\", handler]);\n\t\t},\n\t\t\"can.hasOwnKey\": function(key) {\n\t\t\tif (!this[observeDataSymbol]) {\n\t\t\t\tinitPromise(this);\n\t\t\t}\n\t\t\treturn (key in this[observeDataSymbol]);\n\t\t}\n\t});\n}\n\nvar canReflectPromise_2_2_1_canReflectPromise = setupPromise;\n\nvar getValueSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.getValue\");\nvar setValueSymbol$3 = canSymbol_1_7_0_canSymbol.for(\"can.setValue\");\n\nvar isValueLikeSymbol = canSymbol_1_7_0_canSymbol.for(\"can.isValueLike\");\nvar peek$3 = canObservationRecorder_1_3_1_canObservationRecorder.ignore(canReflect_1_19_2_canReflect.getKeyValue.bind(canReflect_1_19_2_canReflect));\nvar observeReader;\nvar isPromiseLike = canObservationRecorder_1_3_1_canObservationRecorder.ignore(function isPromiseLike(value){\n\treturn typeof value === \"object\" && value && typeof value.then === \"function\";\n});\n\nvar bindName = Function.prototype.bind;\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tbindName = function(source){\n\t\tvar fn = Function.prototype.bind.call(this, source);\n\t\tObject.defineProperty(fn, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(source) + \".\"+canReflect_1_19_2_canReflect.getName(this)\n\t\t});\n\t\treturn fn;\n\t};\n}\n//!steal-remove-end\n\nvar isAt = function(index, reads) {\n\tvar prevRead = reads[index-1];\n\treturn prevRead && prevRead.at;\n};\n\nvar readValue = function(value, index, reads, options, state, prev){\n\t// if the previous read is AT false ... we shouldn't be doing this;\n\tvar usedValueReader;\n\tdo {\n\n\t\tusedValueReader = false;\n\t\tfor(var i =0, len = observeReader.valueReaders.length; i < len; i++){\n\t\t\tif( observeReader.valueReaders[i].test(value, index, reads, options) ) {\n\t\t\t\tvalue = observeReader.valueReaders[i].read(value, index, reads, options, state, prev);\n\t\t\t\t//usedValueReader = true;\n\t\t\t}\n\t\t}\n\t} while(usedValueReader);\n\n\treturn value;\n};\n\nvar specialRead = {index: true, key: true, event: true, element: true, viewModel: true};\n\nvar checkForObservableAndNotify = function(options, state, getObserves, value, index){\n\tif(options.foundObservable && !state.foundObservable) {\n\t\tif(canObservationRecorder_1_3_1_canObservationRecorder.trapsCount()) {\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.addMany( getObserves() );\n\t\t\toptions.foundObservable(value, index);\n\t\t\tstate.foundObservable = true;\n\t\t}\n\t}\n};\n\nvar objHasKeyAtIndex = function(obj, reads, index) {\n\treturn !!(\n\t\treads && reads.length &&\n\t\tcanReflect_1_19_2_canReflect.hasKey(obj, reads[index].key)\n\t);\n};\n\nobserveReader = {\n\t// there are things that you need to evaluate when you get them back as a property read\n\t// for example a compute or a function you might need to call to get the next value to\n\t// actually check\n\t// - readCompute - can be set to `false` to prevent reading an ending compute. This is used by component to get a\n\t// compute as a delegate. In 3.0, this should be removed and force people to write \"{@prop} change\"\n\t// - callMethodsOnObservables - this is an overwrite ... so normal methods won't be called, but observable ones will.\n\t// - executeAnonymousFunctions - call a function if it's found, defaults to true\n\t// - proxyMethods - if the last read is a method, return a function so `this` will be correct.\n\t// - args - arguments to call functions with.\n\t//\n\t// Callbacks\n\t// - earlyExit - called if a value could not be found\n\t// - foundObservable - called when an observable value is found\n\tread: function (parent, reads, options) {\n\t\toptions = options || {};\n\t\tvar state = {\n\t\t\tfoundObservable: false\n\t\t};\n\t\tvar getObserves;\n\t\tif(options.foundObservable) {\n\t\t\tgetObserves = canObservationRecorder_1_3_1_canObservationRecorder.trap();\n\t\t}\n\n\t\t// `cur` is the current value.\n\t\tvar cur = readValue(parent, 0, reads, options, state),\n\t\t\t// `prev` is the object we are reading from.\n\t\t\tprev,\n\t\t\t// `foundObs` did we find an observable.\n\t\t\treadLength = reads.length,\n\t\t\ti = 0,\n\t\t\tparentHasKey;\n\n\t\tcheckForObservableAndNotify(options, state, getObserves, parent, 0);\n\n\t\twhile( i < readLength ) {\n\t\t\tprev = cur;\n\t\t\t// try to read the property\n\t\t\tfor(var r=0, readersLength = observeReader.propertyReaders.length; r < readersLength; r++) {\n\t\t\t\tvar reader = observeReader.propertyReaders[r];\n\t\t\t\tif(reader.test(cur)) {\n\t\t\t\t\tcur = reader.read(cur, reads[i], i, options, state);\n\t\t\t\t\tbreak; // there can be only one reading of a property\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckForObservableAndNotify(options, state, getObserves, prev, i);\n\t\t\ti = i+1;\n\t\t\t// read the value if it is a compute or function\n\t\t\tcur = readValue(cur, i, reads, options, state, prev);\n\n\t\t\tcheckForObservableAndNotify(options, state, getObserves, prev, i-1);\n\t\t\t// early exit if need be\n\t\t\tif (i < reads.length && (cur === null || cur === undefined )) {\n\t\t\t\tparentHasKey = objHasKeyAtIndex(prev, reads, i - 1);\n\t\t\t\tif (options.earlyExit && !parentHasKey) {\n\t\t\t\t\toptions.earlyExit(prev, i - 1, cur);\n\t\t\t\t}\n\t\t\t\t// return undefined so we know this isn't the right value\n\t\t\t\treturn {\n\t\t\t\t\tvalue: undefined,\n\t\t\t\t\tparent: prev,\n\t\t\t\t\tparentHasKey: parentHasKey,\n\t\t\t\t\tfoundLastParent: false\n\t\t\t\t};\n\t\t\t}\n\n\t\t}\n\n\t\tparentHasKey = objHasKeyAtIndex(prev, reads, reads.length - 1);\n\t\t// if we don't have a value, exit early.\n\t\tif (cur === undefined && !parentHasKey) {\n\t\t\tif (options.earlyExit) {\n\t\t\t\toptions.earlyExit(prev, i - 1);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue: cur,\n\t\t\tparent: prev,\n\t\t\tparentHasKey: parentHasKey,\n\t\t\tfoundLastParent: true\n\t\t};\n\t},\n\tget: function(parent, reads, options){\n\t\treturn observeReader.read(parent, observeReader.reads(reads), options || {}).value;\n\t},\n\tvalueReadersMap: {},\n\t// an array of types that might have a value inside them like functions\n\t// value readers check the current value\n\t// and get a new value from it\n\t// ideally they would keep calling until\n\t// none of these passed\n\tvalueReaders: [\n\t\t{\n\t\t\tname: \"function\",\n\t\t\t// if this is a function before the last read and its not a constructor function\n\t\t\ttest: function(value){\n\t\t\t\treturn value && canReflect_1_19_2_canReflect.isFunctionLike(value) && !canReflect_1_19_2_canReflect.isConstructorLike(value);\n\t\t\t},\n\t\t\tread: function(value, i, reads, options, state, prev){\n\t\t\t\tif(options.callMethodsOnObservables && canReflect_1_19_2_canReflect.isObservableLike(prev) && canReflect_1_19_2_canReflect.isMapLike(prev)) {\n\t\t\t\t\tdev.warn(\"can-stache-key: read() called with `callMethodsOnObservables: true`.\");\n\n\t\t\t\t\treturn value.apply(prev, options.args || []);\n\t\t\t\t}\n\n\t\t\t\treturn options.proxyMethods !== false ? bindName.call(value, prev) : value;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tname: \"isValueLike\",\n\t\t\t// compute value reader\n\t\t\ttest: function(value, i, reads, options) {\n\t\t\t\treturn value && value[getValueSymbol$2] && value[isValueLikeSymbol] !== false && (options.foundAt || !isAt(i, reads) );\n\t\t\t},\n\t\t\tread: function(value, i, reads, options){\n\t\t\t\tif(options.readCompute === false && i === reads.length ) {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t\treturn canReflect_1_19_2_canReflect.getValue(value);\n\t\t\t},\n\t\t\twrite: function(base, newVal){\n\t\t\t\tif(base[setValueSymbol$3]) {\n\t\t\t\t\tbase[setValueSymbol$3](newVal);\n\t\t\t\t} else if(base.set) {\n\t\t\t\t\tbase.set(newVal);\n\t\t\t\t} else {\n\t\t\t\t\tbase(newVal);\n\t\t\t\t}\n\t\t\t}\n\t\t}],\n\tpropertyReadersMap: {},\n\t// an array of things that might have a property\n\tpropertyReaders: [\n\t\t{\n\t\t\tname: \"map\",\n\t\t\ttest: function(value){\n\t\t\t\t// the first time we try reading from a promise, set it up for\n\t\t\t\t// special reflections.\n\t\t\t\tif(canReflect_1_19_2_canReflect.isPromise(value) ||\n\t\t\t\t\tisPromiseLike(value)) {\n\t\t\t\t\tcanReflectPromise_2_2_1_canReflectPromise(value);\n\t\t\t\t}\n\n\t\t\t\treturn canReflect_1_19_2_canReflect.isObservableLike(value) && canReflect_1_19_2_canReflect.isMapLike(value);\n\t\t\t},\n\t\t\tread: function(value, prop){\n\t\t\t\tvar res = canReflect_1_19_2_canReflect.getKeyValue(value, prop.key);\n\t\t\t\tif(res !== undefined) {\n\t\t\t\t\treturn res;\n\t\t\t\t} else {\n\t\t\t\t\treturn value[prop.key];\n\t\t\t\t}\n\t\t\t},\n\t\t\twrite: canReflect_1_19_2_canReflect.setKeyValue\n\t\t},\n\n\t\t// read a normal object\n\t\t{\n\t\t\tname: \"object\",\n\t\t\t// this is the default\n\t\t\ttest: function(){return true;},\n\t\t\tread: function(value, prop, i, options){\n\t\t\t\tif(value == null) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t} else {\n\t\t\t\t\tif(typeof value === \"object\") {\n\t\t\t\t\t\tif(prop.key in value) {\n\t\t\t\t\t\t\treturn value[prop.key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// TODO: remove in 5.0.\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tif( prop.at && specialRead[prop.key] && ( (\"@\"+prop.key) in value)) {\n\t\t\t\t\t\t\t\toptions.foundAt = true;\n\t\t\t\t\t\t\t\tdev.warn(\"Use %\"+prop.key+\" in place of @\"+prop.key+\".\");\n\t\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn value[prop.key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\twrite: function(base, prop, newVal){\n\t\t\t\tvar propValue = base[prop];\n\t\t\t\t// if newVal is observable object, lets try to update\n\t\t\t\tif(newVal != null && typeof newVal === \"object\" && canReflect_1_19_2_canReflect.isMapLike(propValue) ) {\n\t\t\t\t\tdev.warn(\"can-stache-key: Merging data into \\\"\" + prop + \"\\\" because its parent is non-observable\");\n\t\t\t\t\tcanReflect_1_19_2_canReflect.update(propValue, newVal);\n\t\t\t\t} else if(propValue != null && propValue[setValueSymbol$3] !== undefined){\n\t\t\t\t\tcanReflect_1_19_2_canReflect.setValue(propValue, newVal);\n\t\t\t\t} else {\n\t\t\t\t\tbase[prop] = newVal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t],\n\treads: function(keyArg) {\n\t\tvar key = \"\"+keyArg;\n\t\tvar keys = [];\n\t\tvar last = 0;\n\t\tvar at = false;\n\t\tif( key.charAt(0) === \"@\" ) {\n\t\t\tlast = 1;\n\t\t\tat = true;\n\t\t}\n\t\tvar keyToAdd = \"\";\n\t\tfor(var i = last; i < key.length; i++) {\n\t\t\tvar character = key.charAt(i);\n\t\t\tif(character === \".\" || character === \"@\") {\n\t\t\t\tif( key.charAt(i -1) !== \"\\\\\" ) {\n\t\t\t\t\tkeys.push({\n\t\t\t\t\t\tkey: keyToAdd,\n\t\t\t\t\t\tat: at\n\t\t\t\t\t});\n\t\t\t\t\tat = character === \"@\";\n\t\t\t\t\tkeyToAdd = \"\";\n\t\t\t\t} else {\n\t\t\t\t\tkeyToAdd = keyToAdd.substr(0,keyToAdd.length - 1) + \".\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkeyToAdd += character;\n\t\t\t}\n\t\t}\n\t\tkeys.push({\n\t\t\tkey: keyToAdd,\n\t\t\tat: at\n\t\t});\n\n\t\treturn keys;\n\t},\n\t// This should be able to set a property similar to how read works.\n\twrite: function(parent, key, value, options) {\n\t\tvar keys = typeof key === \"string\" ? observeReader.reads(key) : key;\n\t\tvar last;\n\n\t\toptions = options || {};\n\t\tif(keys.length > 1) {\n\t\t\tlast = keys.pop();\n\t\t\tparent = observeReader.read(parent, keys, options).value;\n\t\t\tkeys.push(last);\n\t\t} else {\n\t\t\tlast = keys[0];\n\t\t}\n\t\tif(!parent) {\n\t\t\treturn;\n\t\t}\n\t\tvar keyValue = peek$3(parent, last.key);\n\t\t// here's where we need to figure out the best way to write\n\n\t\t// if property being set points at a compute, set the compute\n\t\tif( observeReader.valueReadersMap.isValueLike.test(keyValue, keys.length - 1, keys, options) ) {\n\t\t\tobserveReader.valueReadersMap.isValueLike.write(keyValue, value, options);\n\t\t} else {\n\t\t\tif(observeReader.valueReadersMap.isValueLike.test(parent, keys.length - 1, keys, options) ) {\n\t\t\t\tparent = parent[getValueSymbol$2]();\n\t\t\t}\n\t\t\tif(observeReader.propertyReadersMap.map.test(parent)) {\n\t\t\t\tobserveReader.propertyReadersMap.map.write(parent, last.key, value, options);\n\t\t\t}\n\t\t\telse if(observeReader.propertyReadersMap.object.test(parent)) {\n\t\t\t\tobserveReader.propertyReadersMap.object.write(parent, last.key, value, options);\n\t\t\t\tif(options.observation) {\n\t\t\t\t\toptions.observation.update();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nobserveReader.propertyReaders.forEach(function(reader){\n\tobserveReader.propertyReadersMap[reader.name] = reader;\n});\nobserveReader.valueReaders.forEach(function(reader){\n\tobserveReader.valueReadersMap[reader.name] = reader;\n});\nobserveReader.set = observeReader.write;\n\nvar canStacheKey_1_4_3_canStacheKey = observeReader;\n\nvar TemplateContext = function(options) {\n\toptions = options || {};\n\tthis.vars = new canSimpleMap_4_3_3_canSimpleMap(options.vars || {});\n\tthis.helpers = new canSimpleMap_4_3_3_canSimpleMap(options.helpers || {});\n\tthis.partials = new canSimpleMap_4_3_3_canSimpleMap(options.partials || {});\n\tthis.tags = new canSimpleMap_4_3_3_canSimpleMap(options.tags || {});\n};\n\nvar canViewScope_4_13_7_templateContext = TemplateContext;\n\nvar canCid_1_3_1_canCid = createCommonjsModule(function (module) {\n\n/**\n * @module {function} can-cid\n * @parent can-typed-data\n * @collection can-infrastructure\n * @package ./package.json\n * @description Utility for getting a unique identifier for an object.\n * @signature `cid(object, optionalObjectType)`\n *\n * Get a unique identifier for the object, optionally prefixed by a type name.\n *\n * Once set, the unique identifier does not change, even if the type name\n * changes on subsequent calls.\n *\n * ```js\n * var cid = require(\"can-cid\");\n * var x = {};\n * var y = {};\n *\n * console.log(cid(x, \"demo\")); // -> \"demo1\"\n * console.log(cid(x, \"prod\")); // -> \"demo1\"\n * console.log(cid(y)); // -> \"2\"\n * ```\n *\n * @param {Object} object The object to uniquely identify.\n * @param {String} name An optional type name with which to prefix the identifier\n *\n * @return {String} Returns the unique identifier\n */\nvar _cid = 0;\n// DOM nodes shouldn't all use the same property\nvar domExpando = \"can\" + new Date();\nvar cid = function (object, name) {\n\tvar propertyName = object.nodeName ? domExpando : \"_cid\";\n\n\tif (!object[propertyName]) {\n\t\t_cid++;\n\t\tobject[propertyName] = (name || '') + _cid;\n\t}\n\treturn object[propertyName];\n};\ncid.domExpando = domExpando;\ncid.get = function(object){\n\tvar type = typeof object;\n\tvar isObject = type !== null && (type === \"object\" || type === \"function\");\n\treturn isObject ? cid(object) : (type + \":\" + object);\n};\n\nif (canNamespace_1_0_0_canNamespace.cid) {\n\tthrow new Error(\"You can't have two versions of can-cid, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.cid = cid;\n}\n});\n\nvar singleReference;\n\nfunction getKeyName(key, extraKey) {\n\tvar keyName = extraKey ? canCid_1_3_1_canCid(key) + \":\" + extraKey : canCid_1_3_1_canCid(key);\n\treturn keyName || key;\n}\n\n// weak maps are slow\n/* if(typeof WeakMap !== \"undefined\") {\n\tvar globalMap = new WeakMap();\n\tsingleReference = {\n\t\tset: function(obj, key, value){\n\t\t\tvar localMap = globalMap.get(obj);\n\t\t\tif( !localMap ) {\n\t\t\t\tglobalMap.set(obj, localMap = new WeakMap());\n\t\t\t}\n\t\t\tlocalMap.set(key, value);\n\t\t},\n\t\tgetAndDelete: function(obj, key){\n\t\t\treturn globalMap.get(obj).get(key);\n\t\t},\n\t\treferences: globalMap\n\t};\n} else {*/\nsingleReference = {\n\t// obj is a function ... we need to place `value` on it so we can retreive it\n\t// we can't use a global map\n\tset: function(obj, key, value, extraKey){\n\t\t// check if it has a single reference map\n\t\tobj[getKeyName(key, extraKey)] = value;\n\t},\n\n\tgetAndDelete: function(obj, key, extraKey){\n\t\tvar keyName = getKeyName(key, extraKey);\n\t\tvar value = obj[keyName];\n\t\tdelete obj[keyName];\n\t\treturn value;\n\t}\n};\n/*}*/\n\nvar canSingleReference_1_3_0_canSingleReference = singleReference;\n\nvar Compute = function(newVal){\n\tif(arguments.length) {\n\t\treturn canReflect_1_19_2_canReflect.setValue(this, newVal);\n\t} else {\n\t\treturn canReflect_1_19_2_canReflect.getValue(this);\n\t}\n};\n\nvar canViewScope_4_13_7_makeComputeLike = function(observable) {\n var compute = Compute.bind(observable);\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(compute, \"name\", {\n\t\t\tvalue: \"Compute<\"+canReflect_1_19_2_canReflect.getName(observable) + \">\",\n\t\t});\n\t}\n\t//!steal-remove-end\n\n compute.on = compute.bind = compute.addEventListener = function(event, handler) {\n var translationHandler = function(newVal, oldVal) {\n handler.call(compute, {type:'change'}, newVal, oldVal);\n };\n canSingleReference_1_3_0_canSingleReference.set(handler, this, translationHandler);\n observable.on(translationHandler);\n };\n compute.off = compute.unbind = compute.removeEventListener = function(event, handler) {\n observable.off( canSingleReference_1_3_0_canSingleReference.getAndDelete(handler, this) );\n };\n\n canReflect_1_19_2_canReflect.assignSymbols(compute, {\n \"can.getValue\": function(){\n return canReflect_1_19_2_canReflect.getValue(observable);\n },\n \"can.setValue\": function(newVal){\n return canReflect_1_19_2_canReflect.setValue(observable, newVal);\n },\n \"can.onValue\": function(handler, queue){\n return canReflect_1_19_2_canReflect.onValue(observable, handler, queue);\n },\n \"can.offValue\": function(handler, queue){\n return canReflect_1_19_2_canReflect.offValue(observable, handler, queue);\n },\n \"can.valueHasDependencies\": function(){\n return canReflect_1_19_2_canReflect.valueHasDependencies(observable);\n },\n \"can.getPriority\": function(){\n \t\treturn canReflect_1_19_2_canReflect.getPriority( observable );\n \t},\n \t\"can.setPriority\": function(newPriority){\n \t\tcanReflect_1_19_2_canReflect.setPriority( observable, newPriority );\n \t},\n\t\t\"can.isValueLike\": true,\n\t\t\"can.isFunctionLike\": false\n });\n compute.isComputed = true;\n return compute;\n};\n\nvar canStacheHelpers_1_2_0_canStacheHelpers = createCommonjsModule(function (module) {\n\n\nif (canNamespace_1_0_0_canNamespace.stacheHelpers) {\n\tthrow new Error(\"You can't have two versions of can-stache-helpers, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.stacheHelpers = {};\n}\n});\n\nvar dispatchSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.dispatch\");\nvar setElementSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.setElement\");\n\n// The goal of this is to create a high-performance compute that represents a key value from can.view.Scope.\n// If the key value is something like {{name}} and the context is a can.Map, a faster\n// binding path will be used where new rebindings don't need to be looked for with every change of\n// the observable property.\n// However, if the property changes to a compute, then the slower `can.compute.read` method of\n// observing values will be used.\n\n// ideally, we would know the order things were read. If the last thing read\n// was something we can observe, and the value of it matched the value of the observation,\n// and the key matched the key of the observation\n// it's a fair bet that we can just listen to that last object.\n// If the `this` is not that object ... freak out. Though `this` is not necessarily part of it. can-observation could make\n// this work.\n\n\nvar getFastPathRoot = canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(computeData){\n\tif( computeData.reads &&\n\t\t\t\t// a single property read\n\t\t\t\tcomputeData.reads.length === 1 ) {\n\t\tvar root = computeData.root;\n\t\tif( root && root[canSymbol_1_7_0_canSymbol.for(\"can.getValue\")] ) {\n\t\t\troot = canReflect_1_19_2_canReflect.getValue(root);\n\t\t}\n\t\t// on a map\n\t\treturn root && canReflect_1_19_2_canReflect.isObservableLike(root) && canReflect_1_19_2_canReflect.isMapLike(root) &&\n\t\t\t// that isn't calling a function\n\t\t\ttypeof root[computeData.reads[0].key] !== \"function\" && root;\n\t}\n\treturn;\n});\n\nvar isEventObject = function(obj){\n\treturn obj && typeof obj.batchNum === \"number\" && typeof obj.type === \"string\";\n};\n\nfunction getMutated(scopeKeyData){\n\t// The _thisArg is the value before the last `.`. For example if the key was `foo.bar.zed`,\n\t// _thisArg would be the value at foo.bar.\n\t// This should be improved as `foo.bar` might not be observable.\n\tvar value$$1 = canObservationRecorder_1_3_1_canObservationRecorder.peekValue(scopeKeyData._thisArg);\n\n\t// Something like `string@split` would provide a primitive which can't be a mutated subject\n\treturn !canReflect_1_19_2_canReflect.isPrimitive(value$$1) ? value$$1 : scopeKeyData.root;\n}\n\nfunction callMutateWithRightArgs(method, mutated, reads, mutator){\n\tif(reads.length) {\n\t\tmethod.call(canReflectDependencies_1_1_2_canReflectDependencies,mutated, reads[ reads.length - 1 ].key ,mutator);\n\t} else {\n\t\tmethod.call(canReflectDependencies_1_1_2_canReflectDependencies,mutated ,mutator);\n\t}\n}\n\n\n\n\nvar warnOnUndefinedProperty;\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\twarnOnUndefinedProperty = function(options) {\n\t\tif ( options.key !== \"debugger\" && !options.parentHasKey) {\n\t\t\tvar filename = options.scope.peek('scope.filename');\n\t\t\tvar lineNumber = options.scope.peek('scope.lineNumber');\n\n\t\t\tvar reads = canStacheKey_1_4_3_canStacheKey.reads(options.key);\n\t\t\tvar firstKey = reads[0].key;\n\t\t\tvar key = reads.map(function(read) {\n\t\t\t\treturn read.key + (read.at ? \"()\" : \"\");\n\t\t\t}).join(\".\");\n\t\t\tvar pathsForKey = options.scope.getPathsForKey(firstKey);\n\t\t\tvar paths = Object.keys( pathsForKey );\n\t\t\tvar firstKeyValue = options.scope.get(firstKey);\n\n\t\t\tvar includeSuggestions = paths.length && (paths.indexOf(firstKey) < 0);\n\n\t\t\tvar warning = [\n\t\t\t\t(filename ? filename + ':' : '') +\n\t\t\t\t\t(lineNumber ? lineNumber + ': ' : '') +\n\t\t\t\t\t'Unable to find key \"' + key + '\".'\n\t\t\t];\n\n\t\t\tif (includeSuggestions) {\n\t\t\t\twarning[0] = warning[0] + ' Did you mean' + (paths.length > 1 ? ' one of these' : '') + '?\\n';\n\t\t\t\tpaths.forEach(function(path) {\n\t\t\t\t\twarning.push('\\t\"' + path + '\" which will read from');\n\t\t\t\t\twarning.push(pathsForKey[path]);\n\t\t\t\t\twarning.push(\"\\n\");\n\t\t\t\t});\n\t\t\t} else if (firstKeyValue) {\n\t\t\t\twarning[0] = warning[0] + ' Found \"' + firstKey + '\" with value: %o\\n';\n\t\t\t}\n\n\t\t\tif (firstKeyValue) {\n\t\t\t\tdev.warn.apply(dev, [warning.join(\"\\n\"), firstKeyValue]);\n\t\t\t} else {\n\t\t\t\tdev.warn.apply(dev,\n\t\t\t\t\twarning\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t};\n}\n//!steal-remove-end\n\n// could we make this an observation first ... and have a getter for the compute?\n\n// This is a fast-path enabled Observation wrapper use many places in can-stache.\n// The goal of this is to:\n//\n// 1. Make something that can be passed to can-view-live directly, hopefully\n// avoiding creating expensive computes. Instead we will only be creating\n// `ScopeKeyData` which are thin wrappers.\nvar ScopeKeyData = function(scope, key, options){\n\n\tthis.startingScope = scope;\n\tthis.key = key;\n\tthis.read = this.read.bind(this);\n\tthis.dispatch = this.dispatch.bind(this);\n\n\t// special case debugger helper so that it is called with helperOtions\n\t// when you do {{debugger}} as it already is with {{debugger()}}\n\tif (key === \"debugger\") {\n\t\t// prevent \"Unable to find key\" warning\n\t\tthis.startingScope = { _context: canStacheHelpers_1_2_0_canStacheHelpers };\n\n\t\tthis.read = function() {\n\t\t\tvar helperOptions = { scope: scope };\n\t\t\tvar debuggerHelper = canStacheHelpers_1_2_0_canStacheHelpers[\"debugger\"];\n\t\t\treturn debuggerHelper(helperOptions);\n\t\t};\n\t}\n\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(this.read, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this) + \".read\",\n\t\t});\n\t\tObject.defineProperty(this.dispatch, \"name\", {\n\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this) + \".dispatch\",\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tvar observation = this.observation = new canObservation_4_2_0_canObservation(this.read, this);\n\tthis.options = canAssign_1_3_3_canAssign({ observation: this.observation }, options);\n\n\t// things added later\n\tthis.fastPath = undefined;\n\tthis.root = undefined;\n\tthis.reads = undefined;\n\tthis.setRoot = undefined;\n\t// This is read by call expressions so it needs to be observable\n\tthis._thisArg = new canSimpleObservable_2_5_0_canSimpleObservable();\n\tthis.parentHasKey = undefined;\n\tvar valueDependencies = new Set();\n\tvalueDependencies.add(observation);\n\tthis.dependencies = {valueDependencies: valueDependencies};\n\n\t// This is basically what .get() should give, but it\n\t// isn't used to figure out the last value.\n\tthis._latestValue = undefined;\n};\n\nvalue(ScopeKeyData.prototype);\n\nfunction fastOnBoundSet_Value() {\n\tthis._value = this.newVal;\n}\n\nfunction fastOnBoundSetValue() {\n\tthis.value = this.newVal;\n}\n\ncanAssign_1_3_3_canAssign(ScopeKeyData.prototype, {\n\tconstructor: ScopeKeyData,\n\tdispatch: function dispatch(newVal){\n\t\tvar old = this.value;\n\t\tthis._latestValue = this.value = newVal;\n\t\t// call the base implementation in can-event-queue\n\t\tthis[dispatchSymbol$2].call(this, this.value, old);\n\t},\n\tonBound: function onBound(){\n\t\tthis.bound = true;\n\t\tcanReflect_1_19_2_canReflect.onValue(this.observation, this.dispatch, \"notify\");\n\t\t// TODO: we should check this sometime in the background.\n\t\tvar fastPathRoot = getFastPathRoot(this);\n\t\tif( fastPathRoot ) {\n\t\t\t// rewrite the observation to call its event handlers\n\t\t\tthis.toFastPath(fastPathRoot);\n\t\t}\n\t\tthis._latestValue = this.value = canObservationRecorder_1_3_1_canObservationRecorder.peekValue(this.observation);\n\t},\n\tonUnbound: function onUnbound() {\n\t\tthis.bound = false;\n\t\tcanReflect_1_19_2_canReflect.offValue(this.observation, this.dispatch, \"notify\");\n\t\tthis.toSlowPath();\n\t},\n\tset: function(newVal){\n\t\tvar root = this.root || this.setRoot;\n\t\tif(root) {\n\t\t\tif(this.reads.length) {\n\t\t\t\tcanStacheKey_1_4_3_canStacheKey.write(root, this.reads, newVal, this.options);\n\t\t\t} else {\n\t\t\t\tcanReflect_1_19_2_canReflect.setValue(root,newVal);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.startingScope.set(this.key, newVal, this.options);\n\t\t}\n\t},\n\tget: function() {\n\t\tif (canObservationRecorder_1_3_1_canObservationRecorder.isRecording()) {\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.add(this);\n\t\t\tif (!this.bound) {\n\t\t\t\tcanObservation_4_2_0_canObservation.temporarilyBind(this);\n\t\t\t}\n\t\t}\n\n\t\tif (this.bound === true && this.fastPath === true) {\n\t\t\treturn this._latestValue;\n\t\t} else {\n\t\t\treturn canObservationRecorder_1_3_1_canObservationRecorder.peekValue(this.observation);\n\t\t}\n\t},\n\ttoFastPath: function(fastPathRoot){\n\t\tvar self = this,\n\t\t\tobservation = this.observation;\n\n\t\tthis.fastPath = true;\n\n\t\t// there won't be an event in the future ...\n\t\tobservation.dependencyChange = function(target, newVal){\n\t\t\tif(isEventObject(newVal)) {\n\t\t\t\tthrow \"no event objects!\";\n\t\t\t}\n\t\t\t// but I think we will be able to get at it b/c there should only be one\n\t\t\t// dependency we are binding to ...\n\t\t\tif(target === fastPathRoot && typeof newVal !== \"function\") {\n\t\t\t\tself._latestValue = newVal;\n\t\t\t\tthis.newVal = newVal;\n\t\t\t} else {\n\t\t\t\t// restore\n\t\t\t\tself.toSlowPath();\n\t\t\t}\n\n\t\t\treturn canObservation_4_2_0_canObservation.prototype.dependencyChange.apply(this, arguments);\n\t\t};\n\n\t\tif (observation.hasOwnProperty(\"_value\")) {// can-observation 4.1+\n\t\t\tobservation.onBound = fastOnBoundSet_Value;\n\t\t} else {// can-observation < 4.1\n\t\t\tobservation.onBound = fastOnBoundSetValue;\n\t\t}\n\t},\n\ttoSlowPath: function(){\n\t\tthis.observation.dependencyChange = canObservation_4_2_0_canObservation.prototype.dependencyChange;\n\t\tthis.observation.onBound = canObservation_4_2_0_canObservation.prototype.onBound;\n\t\tthis.fastPath = false;\n\t},\n\tread: function(){\n\t\tvar data;\n\n\t\tif (this.root) {\n\t\t\t// if we've figured out a root observable, start reading from there\n\t\t\tdata = canStacheKey_1_4_3_canStacheKey.read(this.root, this.reads, this.options);\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t// remove old dependency\n\t\t\t\tif(this.reads.length) {\n\t\t\t\t\tcallMutateWithRightArgs(canReflectDependencies_1_1_2_canReflectDependencies.deleteMutatedBy, getMutated(this), this.reads,this);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\t// update thisArg and add new dependency\n\t\t\tthis.thisArg = data.parent;\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tvar valueDeps = new Set();\n\t\t\t\tvalueDeps.add(this);\n\t\t\t\tcallMutateWithRightArgs(canReflectDependencies_1_1_2_canReflectDependencies.addMutatedBy, data.parent || this.root, this.reads,{\n\t\t\t\t\tvalueDependencies: valueDeps\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\treturn data.value;\n\t\t}\n\t\t// If the key has not already been located in a observable then we need to search the scope for the\n\t\t// key. Once we find the key then we need to return it's value and if it is found in an observable\n\t\t// then we need to store the observable so the next time this compute is called it can grab the value\n\t\t// directly from the observable.\n\t\tdata = this.startingScope.read(this.key, this.options);\n\n\n\t\tthis.scope = data.scope;\n\t\tthis.reads = data.reads;\n\t\tthis.root = data.rootObserve;\n\t\tthis.setRoot = data.setRoot;\n\t\tthis.thisArg = data.thisArg;\n\t\tthis.parentHasKey = data.parentHasKey;\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (data.rootObserve) {\n\t\t\t\tvar rootValueDeps = new Set();\n\t\t\t\trootValueDeps.add(this);\n\t\t\t\tcallMutateWithRightArgs(canReflectDependencies_1_1_2_canReflectDependencies.addMutatedBy, getMutated(this), data.reads,{\n\t\t\t\t\tvalueDependencies: rootValueDeps\n\t\t\t\t});\n\t\t\t}\n\t\t\tif(data.value === undefined && this.options.warnOnMissingKey === true) {\n\t\t\t\twarnOnUndefinedProperty({\n\t\t\t\t\tscope: this.startingScope,\n\t\t\t\t\tkey: this.key,\n\t\t\t\t\tparentHasKey: data.parentHasKey\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\treturn data.value;\n\t},\n\thasDependencies: function(){\n\t\t// ScopeKeyData is unique in that when these things are read, it will temporarily bind\n\t\t// to make sure the right value is returned. This is for can-stache.\n\t\t// Helpers warns about a missing helper.\n\t\tif (!this.bound) {\n\t\t\tcanObservation_4_2_0_canObservation.temporarilyBind(this);\n\t\t}\n\t\treturn canReflect_1_19_2_canReflect.valueHasDependencies( this.observation );\n\t}\n});\n\nObject.defineProperty(ScopeKeyData.prototype, \"thisArg\", {\n\tget: function(){\n\t\treturn this._thisArg.get();\n\t},\n\tset: function(newVal) {\n\t\tthis._thisArg.set(newVal);\n\t}\n});\n\nvar scopeKeyDataPrototype = {\n\t\"can.getValue\": ScopeKeyData.prototype.get,\n\t\"can.setValue\": ScopeKeyData.prototype.set,\n\t\"can.valueHasDependencies\": ScopeKeyData.prototype.hasDependencies,\n\t\"can.getValueDependencies\": function() {\n\t\treturn this.dependencies;\n\t},\n\t\"can.getPriority\": function(){\n\t\treturn canReflect_1_19_2_canReflect.getPriority( this.observation );\n\t},\n\t\"can.setPriority\": function(newPriority){\n\t\tcanReflect_1_19_2_canReflect.setPriority( this.observation, newPriority );\n\t},\n\t\"can.setElement\": function(element) {\n\t\tthis.observation[setElementSymbol$1](element);\n\t}\n};\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tscopeKeyDataPrototype[\"can.getName\"] = function() {\n\t\treturn canReflect_1_19_2_canReflect.getName(this.constructor) + \"{{\" + this.key + \"}}\";\n\t};\n}\n//!steal-remove-end\ncanReflect_1_19_2_canReflect.assignSymbols(ScopeKeyData.prototype, scopeKeyDataPrototype);\n\n// Creates a compute-like for legacy reasons ...\nObject.defineProperty(ScopeKeyData.prototype, \"compute\", {\n\tget: function(){\n\t\tvar compute = canViewScope_4_13_7_makeComputeLike(this);\n\n\t\tObject.defineProperty(this, \"compute\", {\n\t\t\tvalue: compute,\n\t\t\twritable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t\treturn compute;\n\t},\n\tconfigurable: true\n});\n\nObject.defineProperty(ScopeKeyData.prototype, \"initialValue\", {\n\tget: function(){\n\t\tif (!this.bound) {\n\t\t\tcanObservation_4_2_0_canObservation.temporarilyBind(this);\n\t\t}\n\t\treturn canObservationRecorder_1_3_1_canObservationRecorder.peekValue(this);\n\t},\n\tset: function(){\n\t\tthrow new Error(\"initialValue should not be set\");\n\t},\n\tconfigurable: true\n});\n\nvar canViewScope_4_13_7_scopeKeyData = ScopeKeyData;\n\nvar canViewScope_4_13_7_compute_data = function(scope, key, options){\n\treturn new canViewScope_4_13_7_scopeKeyData(scope, key, options || {\n\t\targs: []\n\t});\n};\n\n// ### LetContext\n// Instances of this are used to create a `let` variable context.\n\n// Like Object.create, but only keeps Symbols and properties in `propertiesToKeep`\nfunction objectCreateWithSymbolsAndSpecificProperties(obj, propertiesToKeep) {\n\tvar newObj = {};\n\n\t// copy over all Symbols from obj\n\tif (\"getOwnPropertySymbols\" in Object) {\n\t\tObject.getOwnPropertySymbols(obj).forEach(function(key) {\n\t\t\tnewObj[key] = obj[key];\n\t\t});\n\t}\n\n\t// copy over specific properties from obj (also fake Symbols properties for IE support);\n\tObject.getOwnPropertyNames(obj).forEach(function(key) {\n\t\tif (propertiesToKeep.indexOf(key) >= 0 || key.indexOf(\"@@symbol\") === 0) {\n\t\t\tnewObj[key] = obj[key];\n\t\t}\n\t});\n\n\treturn Object.create(newObj);\n}\n\nvar LetContext = canSimpleMap_4_3_3_canSimpleMap.extend(\"LetContext\", {});\nLetContext.prototype = objectCreateWithSymbolsAndSpecificProperties(canSimpleMap_4_3_3_canSimpleMap.prototype, [\n\t// SimpleMap properties\n\t\"setup\",\n\t\"attr\",\n\t\"serialize\",\n\t\"get\",\n\t\"set\",\n\t\"log\",\n\t// required by SimpleMap properties\n\t\"dispatch\",\n\t// Construct properties (not added by can-event-queue)\n\t\"constructorExtends\",\n\t\"newInstance\",\n\t\"_inherit\",\n\t\"_defineProperty\",\n\t\"_overwrite\",\n\t\"instance\",\n\t\"extend\",\n\t\"ReturnValue\",\n\t\"setup\",\n\t\"init\"\n]);\nLetContext.prototype.constructor = LetContext;\n\nvar canViewScope_4_13_7_letContext = LetContext;\n\n// # can-view-scope.js\n//\n// This provides the ability to lookup values across a higherarchy of objects. This is similar to\n// how closures work in JavaScript.\n//\n// This is done with the `Scope` type. It works by having a `_context` reference to\n// an object whose properties can be searched for values. It also has a `_parent` reference\n// to the next Scope in which to check. In this way, `Scope` is used to form a tree-like\n// structure. Leaves and Nodes in the tree only point to their parent.\n\n\n\n\n\n\n\n\n\n\n\n\n\n// ## Helpers\n\nfunction canHaveProperties(obj){\n\treturn obj != null;\n}\nfunction returnFalse(){\n\treturn false;\n}\n\n// ## Scope\n// Represents a node in the scope tree.\nfunction Scope(context, parent, meta) {\n\t// The object that will be looked on for values.\n\t// If the type of context is TemplateContext, there will be special rules for it.\n\tthis._context = context;\n\t// The next Scope object whose context should be looked on for values.\n\tthis._parent = parent;\n\t// If this is a special context, it can be labeled here.\n\t// Options are:\n\t// - `viewModel` - This is a viewModel. This is mostly used by can-component to make `scope.vm` work.\n\t// - `notContext` - This can't be looked within using `./` and `../`. It will be skipped.\n\t// This is for virtual contexts like those used by `%index`. This is very much like\n\t// `variable`. Most things should switch to `variable` in the future.\n\t// - `special` - This can't be looked within using `./` and `../`. It will be skipped.\n\t// This is for reading properties on the scope {{scope.index}}. It's different from variable\n\t// because it's never lookup up like {{key}}.\n\t// - `variable` - This is used to define a variable (as opposed to \"normal\" context). These\n\t// will also be skipped when using `./` and `../`.\n\tthis._meta = meta || {};\n\n\t// A cache that can be used to store computes used to look up within this scope.\n\t// For example if someone creates a compute to lookup `name`, another compute does not\n\t// need to be created.\n\tthis.__cache = {};\n}\n\nvar parentContextSearch = /(\\.\\.\\/)|(\\.\\/)|(this[\\.@])/g;\n\n// ## Static Methods\n// The following methods are exposed mostly for testing purposes.\ncanAssign_1_3_3_canAssign(Scope, {\n\t// ### Scope.read\n\t// Scope.read was moved to can-stache-key.read\n\t// can-stache-key.read reads properties from a parent. A much more complex version of getObject.\n\tread: canStacheKey_1_4_3_canStacheKey.read,\n\tTemplateContext: canViewScope_4_13_7_templateContext,\n\t// ### keyInfo(key)\n\t// Returns an object that details what the `key` means with the following:\n\t// ```js\n\t// {\n\t// remainingKey, // what would be read on a context (or this)\n\t// isScope, // if the scope itself is being read\n\t// inScope, // if a key on the scope is being read\n\t// parentContextWalkCount, // how many ../\n\t// isContextBased // if a \"normal\" context is explicitly being read\n\t// }\n\t// ```\n\tkeyInfo: function(attr){\n\n\t\tif (attr === \"./\") {\n\t\t\tattr = \"this\";\n\t\t}\n\n\t\tvar info = {remainingKey: attr};\n\n\t\t// handle scope stuff first\n\t\tinfo.isScope = attr === \"scope\";\n\t\tif(info.isScope) {\n\t\t\treturn info;\n\t\t}\n\t\tvar firstSix = attr.substr(0, 6);\n\t\tinfo.isInScope =\n\t\t\tfirstSix === \"scope.\" ||\n\t\t\tfirstSix === \"scope@\";\n\t\tif(info.isInScope) {\n\t\t\tinfo.remainingKey = attr.substr(6);\n\t\t\treturn info;\n\t\t} else if(firstSix === \"scope/\") {\n\t\t\tinfo.walkScope = true;\n\t\t\tinfo.remainingKey = attr.substr(6);\n\t\t\treturn info;\n\t\t} else if(attr.substr(0, 7) === \"@scope/\") {\n\t\t\tinfo.walkScope = true;\n\t\t\tinfo.remainingKey = attr.substr(7);\n\t\t\treturn info;\n\t\t}\n\n\t\tinfo.parentContextWalkCount = 0;\n\t\t// Searches for `../` and other context specifiers\n\t\tinfo.remainingKey = attr.replace(parentContextSearch, function(token, parentContext, dotSlash, thisContext, index){\n\t\t\tinfo.isContextBased = true;\n\t\t\tif(parentContext !== undefined) {\n\t\t\t\tinfo.parentContextWalkCount++;\n\t\t\t}\n\t\t\treturn \"\";\n\t\t});\n\t\t// ../..\n\t\tif(info.remainingKey === \"..\") {\n\t\t\tinfo.parentContextWalkCount++;\n\t\t\tinfo.remainingKey = \"this\";\n\t\t}\n\t\telse if(info.remainingKey === \".\" || info.remainingKey === \"\") {\n\t\t\tinfo.remainingKey = \"this\";\n\t\t}\n\n\t\tif(info.remainingKey === \"this\") {\n\t\t\tinfo.isContextBased = true;\n\t\t}\n\t\treturn info;\n\t},\n\t// ### isTemplateContextOrCanNotHaveProperties\n\t// Returns `true` if a template context or a `null` or `undefined`\n\t// context.\n\tisTemplateContextOrCanNotHaveProperties: function(currentScope){\n\t\tvar currentContext = currentScope._context;\n\t\tif(currentContext instanceof canViewScope_4_13_7_templateContext) {\n\t\t\treturn true;\n\t\t} else if( !canHaveProperties(currentContext) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\t// ### shouldSkipIfSpecial\n\t// Return `true` if special.\n\tshouldSkipIfSpecial: function(currentScope){\n\t\tvar isSpecialContext = currentScope._meta.special === true;\n\t\tif (isSpecialContext === true) {\n\t\t\treturn true;\n\t\t}\n\t\tif( Scope.isTemplateContextOrCanNotHaveProperties(currentScope) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\t// ### shouldSkipEverythingButSpecial\n\t// Return `true` if not special.\n\tshouldSkipEverythingButSpecial: function(currentScope){\n\t\tvar isSpecialContext = currentScope._meta.special === true;\n\t\tif (isSpecialContext === false) {\n\t\t\treturn true;\n\t\t}\n\t\tif( Scope.isTemplateContextOrCanNotHaveProperties(currentScope) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},\n\t// ### makeShouldExitOnSecondNormalContext\n\t// This will keep checking until we hit a second \"normal\" context.\n\tmakeShouldExitOnSecondNormalContext: function(){\n\t\tvar foundNormalContext = false;\n\t\treturn function shouldExitOnSecondNormalContext(currentScope){\n\t\t\tvar isNormalContext = !currentScope.isSpecial();\n\t\t\tvar shouldExit = isNormalContext && foundNormalContext;\n\t\t\t// leaks some state\n\t\t\tif(isNormalContext) {\n\t\t\t\tfoundNormalContext = true;\n\t\t\t}\n\t\t\treturn shouldExit;\n\t\t};\n\t},\n\t// ### makeShouldExitAfterFirstNormalContext\n\t// This will not check anything after the first normal context.\n\tmakeShouldExitAfterFirstNormalContext: function(){\n\t\tvar foundNormalContext = false;\n\t\treturn function shouldExitAfterFirstNormalContext(currentScope){\n\t\t\tif(foundNormalContext) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar isNormalContext = !currentScope.isSpecial();\n\t\t\t// leaks some state\n\t\t\tif(isNormalContext) {\n\t\t\t\tfoundNormalContext = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t},\n\t// ### makeShouldSkipSpecialContexts\n\t// Skips `parentContextWalkCount` contexts. This is used to\n\t// walk past scopes when `../` is used.\n\tmakeShouldSkipSpecialContexts: function(parentContextWalkCount){\n\t\tvar walkCount = parentContextWalkCount || 0;\n\t\treturn function shouldSkipSpecialContexts(currentScope){\n\t\t\t// after walking past the correct number of contexts,\n\t\t\t// should not skip notContext scopes\n\t\t\t// so that ../foo can be used to read from a notContext scope\n\t\t\tif (walkCount < 0 && currentScope._meta.notContext) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif(currentScope.isSpecial()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\twalkCount--;\n\n\t\t\tif(walkCount < 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\t}\n});\n\n// ## Prototype methods\ncanAssign_1_3_3_canAssign(Scope.prototype, {\n\n\t// ### scope.add\n\t// Creates a new scope and sets the current scope to be the parent.\n\t// ```\n\t// var scope = new can.view.Scope([\n\t// {name:\"Chris\"},\n\t// {name: \"Justin\"}\n\t// ]).add({name: \"Brian\"});\n\t// scope.attr(\"name\") //-> \"Brian\"\n\t// ```\n\tadd: function(context, meta) {\n\t\tif (context !== this._context) {\n\t\t\treturn new this.constructor(context, this, meta);\n\t\t} else {\n\t\t\treturn this;\n\t\t}\n\t},\n\n\t// ### scope.find\n\t// This is the equivalent of Can 3's scope walking.\n\tfind: function(attr, options) {\n\n\t\tvar keyReads = canStacheKey_1_4_3_canStacheKey.reads(attr);\n\t\tvar howToRead = {\n\t\t\tshouldExit: returnFalse,\n\t\t\tshouldSkip: Scope.shouldSkipIfSpecial,\n\t\t\tshouldLookForHelper: true,\n\t\t\tread: canStacheKey_1_4_3_canStacheKey.read\n\t\t};\n\t\tvar result = this._walk(keyReads, options, howToRead);\n\n\t\treturn result.value;\n\n\t},\n\t// ### scope.readFromSpecialContext\n\treadFromSpecialContext: function(key) {\n\t\treturn this._walk(\n\t\t\t[{key: key, at: false }],\n\t\t\t{ special: true },\n\t\t\t{\n\t\t\t\tshouldExit: returnFalse,\n\t\t\t\tshouldSkip: Scope.shouldSkipEverythingButSpecial,\n\t\t\t\tshouldLookForHelper: false,\n\t\t\t\tread: canStacheKey_1_4_3_canStacheKey.read\n\t\t\t}\n\t\t);\n\t},\n\n\t// ### scope.readFromTemplateContext\n\treadFromTemplateContext: function(key, readOptions) {\n\t\tvar keyReads = canStacheKey_1_4_3_canStacheKey.reads(key);\n\t\treturn canStacheKey_1_4_3_canStacheKey.read(this.templateContext, keyReads, readOptions);\n\t},\n\n\t// ### Scope.prototype.read\n\t// Reads from the scope chain and returns the first non-`undefined` value.\n\t// `read` deals mostly with setting up \"context based\" keys to start reading\n\t// from the right scope. Once the right scope is located, `_walk` is called.\n\t/**\n\t * @hide\n\t * @param {can.stache.key} attr A dot-separated path. Use `\"\\.\"` if you have a property name that includes a dot.\n\t * @param {can.view.Scope.readOptions} options that configure how this gets read.\n\t * @return {{}}\n\t * @option {Object} parent the value's immediate parent\n\t * @option {can.Map|can.compute} rootObserve the first observable to read from.\n\t * @option {Array} reads An array of properties that can be used to read from the rootObserve to get the value.\n\t * @option {*} value the found value\n\t */\n\tread: function(attr, options) {\n\t\toptions = options || {};\n\t\treturn this.readKeyInfo(Scope.keyInfo(attr), options || {});\n\t},\n\treadKeyInfo: function(keyInfo, options){\n\n\t\t// Identify context based keys. Context based keys try to\n\t\t// specify a particular context a key should be within.\n\t\tvar readValue,\n\t\t\tkeyReads,\n\t\t\thowToRead = {\n\t\t\t\tread: options.read || canStacheKey_1_4_3_canStacheKey.read\n\t\t\t};\n\n\t\t// 1.A. Handle reading the scope itself\n\t\tif (keyInfo.isScope) {\n\t\t\treturn { value: this };\n\t\t}\n\t\t// 1.B. Handle reading something on the scope\n\t\telse if (keyInfo.isInScope) {\n\t\t\tkeyReads = canStacheKey_1_4_3_canStacheKey.reads(keyInfo.remainingKey);\n\t\t\t// check for a value on Scope.prototype\n\t\t\treadValue = canStacheKey_1_4_3_canStacheKey.read(this, keyReads, options);\n\n\t\t\t// otherwise, check the templateContext\n\t\t\tif (typeof readValue.value === 'undefined' && !readValue.parentHasKey) {\n\t\t\t\treadValue = this.readFromTemplateContext(keyInfo.remainingKey, options);\n\t\t\t}\n\n\t\t\treturn canAssign_1_3_3_canAssign(readValue, {\n\t\t\t\tthisArg: keyReads.length > 0 ? readValue.parent : undefined\n\t\t\t});\n\t\t}\n\t\t// 1.C. Handle context-based reads. They should skip over special stuff.\n\t\t// this.key, ../.., .././foo\n\t\telse if (keyInfo.isContextBased) {\n\t\t\t// TODO: REMOVE\n\t\t\t// options && options.special === true && console.warn(\"SPECIAL!!!!\");\n\n\t\t\tif(keyInfo.remainingKey !== \"this\") {\n\t\t\t\tkeyReads = canStacheKey_1_4_3_canStacheKey.reads(keyInfo.remainingKey);\n\t\t\t} else {\n\t\t\t\tkeyReads = [];\n\t\t\t}\n\t\t\thowToRead.shouldExit = Scope.makeShouldExitOnSecondNormalContext();\n\t\t\thowToRead.shouldSkip = Scope.makeShouldSkipSpecialContexts(keyInfo.parentContextWalkCount);\n\t\t\thowToRead.shouldLookForHelper = true;\n\n\t\t\treturn this._walk(keyReads, options, howToRead);\n\t\t}\n\t\t// 1.D. Handle scope walking with scope/key\n\t\telse if(keyInfo.walkScope) {\n\t\t\thowToRead.shouldExit = returnFalse;\n\t\t\thowToRead.shouldSkip = Scope.shouldSkipIfSpecial;\n\t\t\thowToRead.shouldLookForHelper = true;\n\t\t\tkeyReads = canStacheKey_1_4_3_canStacheKey.reads(keyInfo.remainingKey);\n\n\t\t\treturn this._walk(keyReads, options, howToRead);\n\t\t}\n\t\t// 1.E. Handle reading without context clues\n\t\t// {{foo}}\n\t\telse {\n\t\t\tkeyReads = canStacheKey_1_4_3_canStacheKey.reads(keyInfo.remainingKey);\n\n\t\t\tvar isSpecialRead = options && options.special === true;\n\t\t\t// TODO: remove\n\t\t\t// options && options.special === true && console.warn(\"SPECIAL!!!!\");\n\n\t\t\thowToRead.shouldExit = Scope.makeShouldExitOnSecondNormalContext();\n\t\t\thowToRead.shouldSkip = isSpecialRead ? Scope.shouldSkipEverythingButSpecial : Scope.shouldSkipIfSpecial;\n\t\t\thowToRead.shouldLookForHelper = isSpecialRead ? false : true;\n\n\t\t\treturn this._walk(keyReads, options, howToRead);\n\t\t}\n\t},\n\n\n\t// ### scope._walk\n\t// This is used to walk up the scope chain.\n\t_walk: function(keyReads, options, howToRead) {\n\t\t// The current scope and context we are trying to find \"keyReads\" within.\n\t\tvar currentScope = this,\n\t\t\tcurrentContext,\n\n\t\t\t// If no value can be found, this is a list of of every observed\n\t\t\t// object and property name to observe.\n\t\t\tundefinedObserves = [],\n\n\t\t\t// Tracks the first found observe.\n\t\t\tcurrentObserve,\n\t\t\t// Tracks the reads to get the value from `currentObserve`.\n\t\t\tcurrentReads,\n\n\t\t\t// Tracks the most likely observable to use as a setter.\n\t\t\tsetObserveDepth = -1,\n\t\t\tcurrentSetReads,\n\t\t\tcurrentSetObserve,\n\n\t\t\treadOptions = canAssign_1_3_3_canAssign({\n\t\t\t\t/* Store found observable, incase we want to set it as the rootObserve. */\n\t\t\t\tfoundObservable: function(observe, nameIndex) {\n\t\t\t\t\tcurrentObserve = observe;\n\t\t\t\t\tcurrentReads = keyReads.slice(nameIndex);\n\t\t\t\t},\n\t\t\t\tearlyExit: function(parentValue, nameIndex) {\n\t\t\t\t\tvar isVariableScope = currentScope._meta.variable === true,\n\t\t\t\t\t\tupdateSetObservable = false;\n\t\t\t\t\tif(isVariableScope === true && nameIndex === 0) {\n\t\t\t\t\t\t// we MUST have pre-defined the key in a variable scope\n\t\t\t\t\t\tupdateSetObservable = canReflect_1_19_2_canReflect.hasKey( parentValue, keyReads[nameIndex].key);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateSetObservable =\n\t\t\t\t\t\t\t// Has more matches\n\t\t\t\t\t\t\tnameIndex > setObserveDepth ||\n\t\t\t\t\t\t\t// The same number of matches but it has the key\n\t\t\t\t\t\t\tnameIndex === setObserveDepth && (typeof parentValue === \"object\" && canReflect_1_19_2_canReflect.hasOwnKey( parentValue, keyReads[nameIndex].key));\n\t\t\t\t\t}\n\t\t\t\t\tif ( updateSetObservable ) {\n\t\t\t\t\t\tcurrentSetObserve = currentObserve;\n\t\t\t\t\t\tcurrentSetReads = currentReads;\n\t\t\t\t\t\tsetObserveDepth = nameIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, options);\n\n\n\n\t\tvar isRecording = canObservationRecorder_1_3_1_canObservationRecorder.isRecording(),\n\t\t\treadAContext = false;\n\n\t\t// Goes through each scope context provided until it finds the key (attr). Once the key is found\n\t\t// then it's value is returned along with an observe, the current scope and reads.\n\t\t// While going through each scope context searching for the key, each observable found is returned and\n\t\t// saved so that either the observable the key is found in can be returned, or in the case the key is not\n\t\t// found in an observable the closest observable can be returned.\n\t\twhile (currentScope) {\n\n\t\t\tif(howToRead.shouldSkip(currentScope) === true) {\n\t\t\t\tcurrentScope = currentScope._parent;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(howToRead.shouldExit(currentScope) === true) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treadAContext = true;\n\n\t\t\tcurrentContext = currentScope._context;\n\n\n\t\t\t// Prevent computes from temporarily observing the reading of observables.\n\t\t\tvar getObserves = canObservationRecorder_1_3_1_canObservationRecorder.trap();\n\n\t\t\tvar data = howToRead.read(currentContext, keyReads, readOptions);\n\n\t\t\t// Retrieve the observes that were read.\n\t\t\tvar observes = getObserves();\n\t\t\t// If a **value was was found**, return value and location data.\n\t\t\tif (data.value !== undefined || data.parentHasKey) {\n\n\t\t\t\tif(!observes.length && isRecording) {\n\t\t\t\t\t// if we didn't actually observe anything\n\t\t\t\t\t// the reads and currentObserve don't mean anything\n\t\t\t\t\t// we just point to the current object so setting is fast\n\t\t\t\t\tcurrentObserve = data.parent;\n\t\t\t\t\tcurrentReads = keyReads.slice(keyReads.length - 1);\n\t\t\t\t} else {\n\t\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.addMany(observes);\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tscope: currentScope,\n\t\t\t\t\trootObserve: currentObserve,\n\t\t\t\t\tvalue: data.value,\n\t\t\t\t\treads: currentReads,\n\t\t\t\t\tthisArg: data.parent,\n\t\t\t\t\tparentHasKey: data.parentHasKey\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Otherwise, save all observables that were read. If no value\n\t\t\t// is found, we will observe on all of them.\n\t\t\telse {\n\t\t\t\tundefinedObserves.push.apply(undefinedObserves, observes);\n\t\t\t}\n\n\t\t\tcurrentScope = currentScope._parent;\n\t\t}\n\n\t\t// The **value was not found** in the scope\n\t\t// if not looking for a \"special\" key, check in can-stache-helpers\n\t\tif (howToRead.shouldLookForHelper) {\n\t\t\tvar helper = this.getHelperOrPartial(keyReads);\n\n\t\t\tif (helper) {\n\t\t\t\t// Don't return parent so `.bind` is not used.\n\t\t\t\treturn {value: helper};\n\t\t\t}\n\t\t}\n\n\t\t// The **value was not found**, return `undefined` for the value.\n\t\t// Make sure we listen to everything we checked for when the value becomes defined.\n\t\t// Once it becomes defined, we won't have to listen to so many things.\n\t\tcanObservationRecorder_1_3_1_canObservationRecorder.addMany(undefinedObserves);\n\t\treturn {\n\t\t\tsetRoot: currentSetObserve,\n\t\t\treads: currentSetReads,\n\t\t\tvalue: undefined,\n\t\t\tnoContextAvailable: !readAContext\n\t\t};\n\t},\n\t// ### scope.getDataForScopeSet\n\t// Returns an object with data needed by `.set` to figure out what to set,\n\t// and how.\n\t// {\n\t// parent: what is being set\n\t// key: try setting a key value\n\t// how: \"setValue\" | \"set\" | \"updateDeep\" | \"write\" | \"setKeyValue\"\n\t// }\n\t// This works by changing how `readKeyInfo` will read individual scopes.\n\t// Specifically, with something like `{{foo.bar}}` it will read `{{foo}}` and\n\t// only check if a `bar` property exists.\n\tgetDataForScopeSet: function getDataForScopeSet(key, options) {\n\t\tvar keyInfo = Scope.keyInfo(key);\n\t\tvar firstSearchedContext;\n\n\t\t// Overwrite the options to use this read.\n\t\tvar opts = canAssign_1_3_3_canAssign({\n\t\t\t// This read is used by `._walk` to read from the scope.\n\t\t\t// This will use `hasKey` on the last property instead of reading it.\n\t\t\tread: function(context, keys){\n\n\t\t\t\t// If nothing can be found with the keys we are looking for, save the\n\t\t\t\t// first possible match. This is where we will write to.\n\t\t\t\tif(firstSearchedContext === undefined && !(context instanceof canViewScope_4_13_7_letContext)) {\n\t\t\t\t\tfirstSearchedContext = context;\n\t\t\t\t}\n\t\t\t\t// If we have multiple keys ...\n\t\t\t\tif(keys.length > 1) {\n\t\t\t\t\t// see if we can find the parent ...\n\t\t\t\t\tvar parentKeys = keys.slice(0, keys.length-1);\n\t\t\t\t\tvar parent = canStacheKey_1_4_3_canStacheKey.read(context, parentKeys, options).value;\n\n\t\t\t\t\t// If there is a parent, see if it has the last key\n\t\t\t\t\tif( parent != null && canReflect_1_19_2_canReflect.hasKey(parent, keys[keys.length-1].key ) ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tparent: parent,\n\t\t\t\t\t\t\tparentHasKey: true,\n\t\t\t\t\t\t\tvalue: undefined\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If we have only one key, try to find a context with this key\n\t\t\t\telse if(keys.length === 1) {\n\t\t\t\t\tif( canReflect_1_19_2_canReflect.hasKey(context, keys[0].key ) ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tparent: context,\n\t\t\t\t\t\t\tparentHasKey: true,\n\t\t\t\t\t\t\tvalue: undefined\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If we have no keys, we are reading `this`.\n\t\t\t\telse {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: context\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},options);\n\n\n\t\t// Use the read above to figure out what we are probably writing to.\n\t\tvar readData = this.readKeyInfo(keyInfo, opts);\n\n\t\tif(keyInfo.remainingKey === \"this\") {\n\t\t\t// If we are setting a context, then return that context\n\t\t\treturn { parent: readData.value, how: \"setValue\" };\n\t\t}\n\t\t// Now we are trying to set a property on something. Parent will\n\t\t// be the something we are setting a property on.\n\t\tvar parent;\n\n\t\tvar props = keyInfo.remainingKey.split(\".\");\n\t\tvar propName = props.pop();\n\n\t\t// If we got a `thisArg`, that's the parent.\n\t\tif(readData.thisArg) {\n\t\t\tparent = readData.thisArg;\n\t\t}\n\t\t// Otherwise, we didn't find anything, use the first searched context.\n\t\t// TODO: there is likely a bug here when trying to set foo.bar where nothing in the scope\n\t\t// has a foo.\n\t\telse if(firstSearchedContext) {\n\t\t\tparent = firstSearchedContext;\n\t\t}\n\n\t\tif (parent === undefined) {\n\t\t\treturn {\n\t\t\t\terror: \"Attempting to set a value at \" +\n\t\t\t\t\tkey + \" where the context is undefined.\"\n\t\t\t};\n\t\t}\n\t\t// Now we need to figure out how we would update this value. The following does that.\n\t\tif(!canReflect_1_19_2_canReflect.isObservableLike(parent) && canReflect_1_19_2_canReflect.isObservableLike(parent[propName])) {\n\t\t\tif(canReflect_1_19_2_canReflect.isMapLike(parent[propName])) {\n\t\t\t\treturn {\n\t\t\t\t\tparent: parent,\n\t\t\t\t\tkey: propName,\n\t\t\t\t\thow: \"updateDeep\",\n\t\t\t\t\twarn: \"can-view-scope: Merging data into \\\"\" +\n\t\t\t\t\t\tpropName + \"\\\" because its parent is non-observable\"\n\t\t\t\t};\n\t\t\t}\n\t\t\telse if(canReflect_1_19_2_canReflect.isValueLike(parent[propName])){\n\t\t\t\treturn { parent: parent, key: propName, how: \"setValue\" };\n\t\t\t} else {\n\t\t\t\treturn { parent: parent, how: \"write\", key: propName, passOptions: true };\n\t\t\t}\n\t\t} else {\n\t\t\treturn { parent: parent, how: \"write\", key: propName, passOptions: true };\n\t\t}\n\t},\n\n\t// ### scope.getHelper\n\t// read a helper from the templateContext or global helpers list\n\tgetHelper: function(keyReads) {\n\t\tconsole.warn(\".getHelper is deprecated, use .getHelperOrPartial\");\n\t\treturn this.getHelperOrPartial(keyReads);\n\t},\n\tgetHelperOrPartial: function(keyReads) {\n\t\t// try every template context\n\t\tvar scope = this, context, helper;\n\t\twhile (scope) {\n\t\t\tcontext = scope._context;\n\t\t\tif (context instanceof canViewScope_4_13_7_templateContext) {\n\t\t\t\thelper = canStacheKey_1_4_3_canStacheKey.read(context.helpers, keyReads, { proxyMethods: false });\n\t\t\t\tif(helper.value !== undefined) {\n\t\t\t\t\treturn helper.value;\n\t\t\t\t}\n\t\t\t\thelper = canStacheKey_1_4_3_canStacheKey.read(context.partials, keyReads, { proxyMethods: false });\n\t\t\t\tif(helper.value !== undefined) {\n\t\t\t\t\treturn helper.value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tscope = scope._parent;\n\t\t}\n\n\t\treturn canStacheKey_1_4_3_canStacheKey.read(canStacheHelpers_1_2_0_canStacheHelpers, keyReads, { proxyMethods: false }).value;\n\t},\n\n\t// ### scope.get\n\t// Gets a value from the scope without being observable.\n\tget: function(key, options) {\n\n\t\toptions = canAssign_1_3_3_canAssign({\n\t\t\tisArgument: true\n\t\t}, options);\n\n\t\tvar res = this.read(key, options);\n\t\treturn res.value;\n\t},\n\tpeek: canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(key, options) {\n\t\treturn this.get(key, options);\n\t}),\n\t// TODO: Remove in 6.0\n\tpeak: canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(key, options) {\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tdev.warn('peak is deprecated, please use peek instead');\n\t\t}\n\t\t//!steal-remove-end\n\t\treturn this.peek(key, options);\n\t}),\n\t// ### scope.getScope\n\t// Returns the first scope that passes the `tester` function.\n\tgetScope: function(tester) {\n\t\tvar scope = this;\n\t\twhile (scope) {\n\t\t\tif (tester(scope)) {\n\t\t\t\treturn scope;\n\t\t\t}\n\t\t\tscope = scope._parent;\n\t\t}\n\t},\n\t// ### scope.getContext\n\t// Returns the first context whose scope passes the `tester` function.\n\tgetContext: function(tester) {\n\t\tvar res = this.getScope(tester);\n\t\treturn res && res._context;\n\t},\n\t// ### scope.getTemplateContext\n\t// Returns the template context scope\n\t// This function isn't named right.\n\tgetTemplateContext: function() {\n\t\tvar lastScope;\n\n\t\t// find the first reference scope\n\t\tvar templateContext = this.getScope(function(scope) {\n\t\t\tlastScope = scope;\n\t\t\treturn scope._context instanceof canViewScope_4_13_7_templateContext;\n\t\t});\n\n\t\t// if there is no reference scope, add one as the root\n\t\tif(!templateContext) {\n\t\t\ttemplateContext = new Scope(new canViewScope_4_13_7_templateContext());\n\n\t\t\t// add templateContext to root of the scope chain so it\n\t\t\t// can be found using `getScope` next time it is looked up\n\t\t\tlastScope._parent = templateContext;\n\t\t}\n\t\treturn templateContext;\n\t},\n\taddTemplateContext: function(){\n\t\treturn this.add(new canViewScope_4_13_7_templateContext());\n\t},\n\taddLetContext: function(values){\n\t\treturn this.add(new canViewScope_4_13_7_letContext(values || {}), {variable: true});\n\t},\n\t// ### scope.getRoot\n\t// Returns the top most context that is not a references scope.\n\t// Used by `.read` to provide `%root`.\n\tgetRoot: function() {\n\t\tvar cur = this,\n\t\t\tchild = this;\n\n\t\twhile (cur._parent) {\n\t\t\tchild = cur;\n\t\t\tcur = cur._parent;\n\t\t}\n\n\t\tif (cur._context instanceof canViewScope_4_13_7_templateContext) {\n\t\t\tcur = child;\n\t\t}\n\t\treturn cur._context;\n\t},\n\n\t// first viewModel scope\n\tgetViewModel: function() {\n\t\tvar vmScope = this.getScope(function(scope) {\n\t\t\treturn scope._meta.viewModel;\n\t\t});\n\n\t\treturn vmScope && vmScope._context;\n\t},\n\n\t// _top_ viewModel scope\n\tgetTop: function() {\n\t\tvar top;\n\n\t\tthis.getScope(function(scope) {\n\t\t\tif (scope._meta.viewModel) {\n\t\t\t\ttop = scope;\n\t\t\t}\n\n\t\t\t// walk entire scope tree\n\t\t\treturn false;\n\t\t});\n\n\t\treturn top && top._context;\n\t},\n\n\t// ### scope.getPathsForKey\n\t// Finds all paths that will return a value for a specific key\n\t// NOTE: this is for development purposes only and is removed in production\n\tgetPathsForKey: function getPathsForKey(key) {\n\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tvar paths = {};\n\n\t\t\tvar getKeyDefinition = function(obj, key) {\n\t\t\t\tif (!obj || typeof obj !== \"object\") {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\n\t\t\t\tvar keyExistsOnObj = key in obj;\n\t\t\t\tvar objHasKey = canReflect_1_19_2_canReflect.hasKey(obj, key);\n\n\t\t\t\treturn {\n\t\t\t\t\tisDefined: keyExistsOnObj || objHasKey,\n\t\t\t\t\tisFunction: keyExistsOnObj && typeof obj[key] === \"function\"\n\t\t\t\t};\n\t\t\t};\n\n\t\t\t// scope.foo@bar -> bar\n\t\t\tvar reads = canStacheKey_1_4_3_canStacheKey.reads(key);\n\t\t\tvar keyParts = reads.map(function(read) {\n\t\t\t\treturn read.key;\n\t\t\t});\n\t\t\tvar scopeIndex = keyParts.indexOf(\"scope\");\n\n\t\t\tif (scopeIndex > -1) {\n\t\t\t\tkeyParts.splice(scopeIndex, 2);\n\t\t\t}\n\t\t\tvar normalizedKey = keyParts.join(\".\");\n\n\t\t\t// check scope.vm.\n\t\t\tvar vm = this.getViewModel();\n\t\t\tvar vmKeyDefinition = getKeyDefinition(vm, normalizedKey);\n\n\t\t\tif (vmKeyDefinition.isDefined) {\n\t\t\t\tpaths[\"scope.vm.\" + normalizedKey + (vmKeyDefinition.isFunction ? \"()\" : \"\")] = vm;\n\t\t\t}\n\n\t\t\t// check scope.top.\n\t\t\tvar top = this.getTop();\n\t\t\tvar topKeyDefinition = getKeyDefinition(top, normalizedKey);\n\n\t\t\tif (topKeyDefinition.isDefined) {\n\t\t\t\tpaths[\"scope.top.\" + normalizedKey + (topKeyDefinition.isFunction ? \"()\" : \"\")] = top;\n\t\t\t}\n\n\t\t\t// find specific paths (like ../key)\n\t\t\tvar cur = \"\";\n\n\t\t\tthis.getScope(function(scope) {\n\t\t\t\t// `notContext` and `special` contexts can't be read using `../`\n\t\t\t\tvar canBeRead = !scope.isSpecial();\n\n\t\t\t\tif (canBeRead) {\n\t\t\t\t\tvar contextKeyDefinition = getKeyDefinition(scope._context, normalizedKey);\n\t\t\t\t\tif (contextKeyDefinition.isDefined) {\n\t\t\t\t\t\tpaths[cur + normalizedKey + (contextKeyDefinition.isFunction ? \"()\" : \"\")] = scope._context;\n\t\t\t\t\t}\n\n\t\t\t\t\tcur += \"../\";\n\t\t\t\t}\n\n\t\t\t\t// walk entire scope tree\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\treturn paths;\n\t\t}\n\t\t//!steal-remove-end\n\t},\n\n\t// ### scope.hasKey\n\t// returns whether or not this scope has the key\n\thasKey: function hasKey(key) {\n\t\tvar reads = canStacheKey_1_4_3_canStacheKey.reads(key);\n\t\tvar readValue;\n\n\t\tif (reads[0].key === \"scope\") {\n\t\t\t// read properties like `scope.vm.foo` directly from the scope\n\t\t\treadValue = canStacheKey_1_4_3_canStacheKey.read(this, reads.slice(1), key);\n\t\t} else {\n\t\t\t// read normal properties from the scope's context\n\t\t\treadValue = canStacheKey_1_4_3_canStacheKey.read(this._context, reads, key);\n\t\t}\n\n\t\treturn readValue.foundLastParent && readValue.parentHasKey;\n\t},\n\n\tset: function(key, value, options) {\n\t\toptions = options || {};\n\n\t\tvar data = this.getDataForScopeSet(key, options);\n\t\tvar parent = data.parent;\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (data.error) {\n\t\t\t\treturn dev.error(data.error);\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\tif (data.warn) {\n\t\t\tdev.warn(data.warn);\n\t\t}\n\n\t\tswitch (data.how) {\n\t\t\tcase \"set\":\n\t\t\t\tparent.set(data.key, value, data.passOptions ? options : undefined);\n\t\t\t\tbreak;\n\n\t\t\tcase \"write\":\n\t\t\t\tcanStacheKey_1_4_3_canStacheKey.write(parent, data.key, value, options);\n\t\t\t\tbreak;\n\n\t\t\tcase \"setValue\":\n\t\t\t\tcanReflect_1_19_2_canReflect.setValue(\"key\" in data ? parent[data.key] : parent, value);\n\t\t\t\tbreak;\n\n\t\t\tcase \"setKeyValue\":\n\t\t\t\tcanReflect_1_19_2_canReflect.setKeyValue(parent, data.key, value);\n\t\t\t\tbreak;\n\n\t\t\tcase \"updateDeep\":\n\t\t\t\tcanReflect_1_19_2_canReflect.updateDeep(parent[data.key], value);\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t// ### scope.attr\n\t// Gets or sets a value in the scope without being observable.\n\tattr: canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(key, value, options) {\n\t\tdev.warn(\"can-view-scope::attr is deprecated, please use peek, get or set\");\n\n\t\toptions = canAssign_1_3_3_canAssign({\n\t\t\tisArgument: true\n\t\t}, options);\n\n\t\t// Allow setting a value on the context\n\t\tif (arguments.length === 2) {\n\t\t\treturn this.set(key, value, options);\n\n\t\t} else {\n\t\t\treturn this.get(key, options);\n\t\t}\n\t}),\n\n\t// ### scope.computeData\n\t// Finds the first location of the key in the scope and then provides a get-set compute that represents the key's value\n\t// and other information about where the value was found.\n\tcomputeData: function(key, options) {\n\t\treturn canViewScope_4_13_7_compute_data(this, key, options);\n\t},\n\n\t// ### scope.compute\n\t// Provides a get-set compute that represents a key's value.\n\tcompute: function(key, options) {\n\t\treturn this.computeData(key, options)\n\t\t\t.compute;\n\t},\n\t// ### scope.cloneFromRef\n\t//\n\t// This takes a scope and essentially copies its chain from\n\t// right before the last TemplateContext. And it does not include the ref.\n\t// this is a helper function to provide lexical semantics for refs.\n\t// This will not be needed for leakScope: false.\n\tcloneFromRef: function() {\n\t\tvar scopes = [];\n\t\tvar scope = this,\n\t\t\tcontext,\n\t\t\tparent;\n\t\twhile (scope) {\n\t\t\tcontext = scope._context;\n\t\t\tif (context instanceof canViewScope_4_13_7_templateContext) {\n\t\t\t\tparent = scope._parent;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tscopes.unshift(scope);\n\t\t\tscope = scope._parent;\n\t\t}\n\t\tif (parent) {\n\t\t\tscopes.forEach(function(scope) {\n\t\t\t\t// For performance, re-use _meta, don't copy it.\n\t\t\t\tparent = parent.add(scope._context, scope._meta);\n\t\t\t});\n\t\t\treturn parent;\n\t\t} else {\n\t\t\treturn this;\n\t\t}\n\t},\n\tisSpecial: function(){\n\t\treturn this._meta.notContext || this._meta.special || (this._context instanceof canViewScope_4_13_7_templateContext) || this._meta.variable;\n\t}\n});\n// Legacy name for _walk.\nScope.prototype._read = Scope.prototype._walk;\n\ncanReflect_1_19_2_canReflect.assignSymbols(Scope.prototype, {\n\t\"can.hasKey\": Scope.prototype.hasKey,\n\t\"can.isScopeLike\": true\n});\n\nvar templateContextPrimitives = [\n\t\"filename\", \"lineNumber\"\n];\n\n// create getters/setters for primitives on the templateContext\n// scope.filename -> scope.readFromTemplateContext(\"filename\")\ntemplateContextPrimitives.forEach(function(key) {\n\tObject.defineProperty(Scope.prototype, key, {\n\t\tget: function() {\n\t\t\treturn this.readFromTemplateContext(key).value;\n\t\t},\n\t\tset: function(val) {\n\t\t\tthis.templateContext[key] = val;\n\t\t}\n\t});\n});\n\ncanDefineLazyValue_1_1_1_defineLazyValue(Scope.prototype, 'templateContext', function() {\n\treturn this.getTemplateContext()._context;\n});\n\ncanDefineLazyValue_1_1_1_defineLazyValue(Scope.prototype, 'root', function() {\n\tdev.warn('`scope.root` is deprecated. Use either `scope.top`: https://canjs.com/doc/can-stache/keys/scope.html#scope_top or `scope.vm`: https://canjs.com/doc/can-stache/keys/scope.html#scope_vm instead.');\n\treturn this.getRoot();\n});\n\ncanDefineLazyValue_1_1_1_defineLazyValue(Scope.prototype, 'vm', function() {\n\treturn this.getViewModel();\n});\n\ncanDefineLazyValue_1_1_1_defineLazyValue(Scope.prototype, 'top', function() {\n\treturn this.getTop();\n});\n\ncanDefineLazyValue_1_1_1_defineLazyValue(Scope.prototype, 'helpers', function() {\n\treturn canStacheHelpers_1_2_0_canStacheHelpers;\n});\n\nvar specialKeywords = [\n\t'index', 'key', 'element',\n\t'event', 'viewModel','arguments',\n\t'helperOptions', 'args'\n];\n\n// create getters for \"special\" keys\n// scope.index -> scope.readFromSpecialContext(\"index\")\nspecialKeywords.forEach(function(key) {\n\tObject.defineProperty(Scope.prototype, key, {\n\t\tget: function() {\n\t\t\treturn this.readFromSpecialContext(key).value;\n\t\t}\n\t});\n});\n\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tScope.prototype.log = function() {\n\t\tvar scope = this;\n\t var indent = \"\";\n\t\tvar contextType = \"\";\n\t\twhile(scope) {\n\t\t\tcontextType = scope._meta.notContext ? \" (notContext)\" :\n\t\t\t\tscope._meta.special ? \" (special)\" : \"\";\n\t\t\tconsole.log(indent, canReflect_1_19_2_canReflect.getName(scope._context) + contextType, scope._context);\n\t scope = scope._parent;\n\t indent += \" \";\n\t }\n\t};\n}\n//!steal-remove-end\n\n\ncanNamespace_1_0_0_canNamespace.view = canNamespace_1_0_0_canNamespace.view || {};\nvar canViewScope_4_13_7_canViewScope = canNamespace_1_0_0_canNamespace.view.Scope = Scope;\n\nfunction KeyObservable(root, key){\n key = \"\"+key;\n this.key = key;\n this.root = root;\n settable.call(this, function(){\n return canStacheKey_1_4_3_canStacheKey.get(this,key);\n }, root);\n}\n\nKeyObservable.prototype = Object.create(settable.prototype);\n\nKeyObservable.prototype.set = function(newVal) {\n canStacheKey_1_4_3_canStacheKey.set(this.root,this.key, newVal);\n};\n\n\nvar keyObservable = KeyObservable;\n\nvar isViewSymbol = canSymbol_1_7_0_canSymbol.for(\"can.isView\");\n\n// this creates a noop that marks that a renderer was called\n// this is for situations where a helper function calls a renderer\n// that was not provided such as\n// {{#if false}} ... {{/if}}\n// with no {{else}}\nvar createNoOpRenderer = function (metadata) {\n\treturn function noop() {\n\t\tif (metadata) {\n\t\t\tmetadata.rendered = true;\n\t\t}\n\t};\n};\n\nvar utils$1 = {\n\tlast: function(arr){\n\t\treturn arr !=null && arr[arr.length-1];\n\t},\n\t// A generic empty function\n\temptyHandler: function(){},\n\t// Converts a string like \"1\" into 1. \"null\" into null, etc.\n\t// This doesn't have to do full JSON, so removing eval would be good.\n\tjsonParse: function(str){\n\t\t// if it starts with a quote, assume a string.\n\t\tif(str[0] === \"'\") {\n\t\t\treturn str.substr(1, str.length -2);\n\t\t} else if(str === \"undefined\") {\n\t\t\treturn undefined;\n\t\t} else {\n\t\t\treturn JSON.parse(str);\n\t\t}\n\t},\n\tmixins: {\n\t\tlast: function(){\n\t\t\treturn this.stack[this.stack.length - 1];\n\t\t},\n\t\tadd: function(chars){\n\t\t\tthis.last().add(chars);\n\t\t},\n\t\tsubSectionDepth: function(){\n\t\t\treturn this.stack.length - 1;\n\t\t}\n\t},\n\t// Sets .fn and .inverse on a helperOptions object and makes sure\n\t// they can reference the current scope and options.\n\tcreateRenderers: function(helperOptions, scope, truthyRenderer, falseyRenderer, isStringOnly){\n\t\thelperOptions.fn = truthyRenderer ? this.makeRendererConvertScopes(truthyRenderer, scope, isStringOnly, helperOptions.metadata) : createNoOpRenderer(helperOptions.metadata);\n\t\thelperOptions.inverse = falseyRenderer ? this.makeRendererConvertScopes(falseyRenderer, scope, isStringOnly, helperOptions.metadata) : createNoOpRenderer(helperOptions.metadata);\n\t\thelperOptions.isSection = !!(truthyRenderer || falseyRenderer);\n\t},\n\t// Returns a new renderer function that makes sure any data or helpers passed\n\t// to it are converted to a can.view.Scope and a can.view.Options.\n\tmakeRendererConvertScopes: function (renderer, parentScope, observeObservables, metadata) {\n\t\tvar convertedRenderer = function (newScope, newOptions) {\n\t\t\t// prevent binding on fn.\n\t\t\t// If a non-scope value is passed, add that to the parent scope.\n\t\t\tif (newScope !== undefined && !(newScope instanceof canViewScope_4_13_7_canViewScope)) {\n\t\t\t\tif (parentScope) {\n\t\t\t\t\tnewScope = parentScope.add(newScope);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewScope = new canViewScope_4_13_7_canViewScope(newScope || {});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (metadata) {\n\t\t\t\tmetadata.rendered = true;\n\t\t\t}\n\n\t\t\tvar result = renderer(newScope || parentScope );\n\t\t\treturn result;\n\t\t};\n\t\treturn observeObservables ? convertedRenderer :\n\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.ignore(convertedRenderer);\n\t},\n\tmakeView: function(renderer){\n\t\tvar view = canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(scope){\n\t\t\tif(!(scope instanceof canViewScope_4_13_7_canViewScope)) {\n\t\t\t\tscope = new canViewScope_4_13_7_canViewScope(scope);\n\t\t\t}\n\t\t\treturn renderer(scope);\n\t\t});\n\t\tview[isViewSymbol] = true;\n\t\treturn view;\n\t},\n\t// Calls the truthy subsection for each item in a list and returning them in a string.\n\tgetItemsStringContent: function(items, isObserveList, helperOptions){\n\t\tvar txt = \"\",\n\t\t\tlen = canStacheKey_1_4_3_canStacheKey.get(items, 'length'),\n\t\t\tisObservable = canReflect_1_19_2_canReflect.isObservableLike(items);\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar item = isObservable ? new keyObservable(items, i) :items[i];\n\t\t\ttxt += helperOptions.fn(item);\n\t\t}\n\t\treturn txt;\n\t},\n\t// Calls the truthy subsection for each item in a list and returns them in a document Fragment.\n\tgetItemsFragContent: function(items, helperOptions, scope) {\n\t\tvar result = [],\n\t\t\tlen = canStacheKey_1_4_3_canStacheKey.get(items, 'length'),\n\t\t\tisObservable = canReflect_1_19_2_canReflect.isObservableLike(items),\n\t\t\thashExprs = helperOptions.exprData && helperOptions.exprData.hashExprs,\n\t\t\thashOptions;\n\n\t\t// Check if using hash\n\t\tif (canReflect_1_19_2_canReflect.size(hashExprs) > 0) {\n\t\t\thashOptions = {};\n\t\t\tcanReflect_1_19_2_canReflect.eachKey(hashExprs, function (exprs, key) {\n\t\t\t\thashOptions[exprs.key] = key;\n\t\t\t});\n\t\t}\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar aliases = {};\n\n\t\t\tvar item = isObservable ? new keyObservable(items, i) :items[i];\n\n\t\t\tif (canReflect_1_19_2_canReflect.size(hashOptions) > 0) {\n\t\t\t\tif (hashOptions.value) {\n\t\t\t\t\taliases[hashOptions.value] = item;\n\t\t\t\t}\n\t\t\t\tif (hashOptions.index) {\n\t\t\t\t\taliases[hashOptions.index] = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.push(helperOptions.fn(\n\t\t\t\tscope\n\t\t\t\t.add(aliases, { notContext: true })\n\t\t\t\t.add({ index: i }, { special: true })\n\t\t\t\t.add(item))\n\t\t\t);\n\t\t}\n\t\treturn result;\n\t}\n};\n\nvar last = utils$1.last;\n\nvar decodeHTML = typeof document !== \"undefined\" && (function(){\n\tvar el = document$1().createElement('div');\n\treturn function(html){\n\t\tif(html.indexOf(\"&\") === -1) {\n\t\t\treturn html.replace(/\\r\\n/g,\"\\n\");\n\t\t}\n\t\tel.innerHTML = html;\n\t\treturn el.childNodes.length === 0 ? \"\" : el.childNodes.item(0).nodeValue;\n\t};\n})();\n// ## HTMLSectionBuilder\n//\n// Contains a stack of HTMLSections.\n// An HTMLSection is created everytime a subsection is found. For example:\n//\n// {{#if(items)}} {{#items}} X\n//\n// At the point X was being processed, there would be 2 HTMLSections in the\n// stack. One for the content of `{{#if(items)}}` and the other for the\n// content of `{{#items}}`\nvar HTMLSectionBuilder = function(filename){\n\tif (filename) {\n\t\tthis.filename = filename;\n\t}\n\tthis.stack = [new HTMLSection()];\n};\n\n\ncanAssign_1_3_3_canAssign(HTMLSectionBuilder.prototype,utils$1.mixins);\n\ncanAssign_1_3_3_canAssign(HTMLSectionBuilder.prototype,{\n\tstartSubSection: function(process){\n\t\tvar newSection = new HTMLSection(process);\n\t\tthis.stack.push(newSection);\n\t\treturn newSection;\n\t},\n\t// Ends the current section and returns a renderer.\n\t// But only returns a renderer if there is a template.\n\tendSubSectionAndReturnRenderer: function(){\n\t\tif(this.last().isEmpty()) {\n\t\t\tthis.stack.pop();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tvar htmlSection = this.endSection();\n\t\t\treturn utils$1.makeView(htmlSection.compiled.hydrate.bind(htmlSection.compiled));\n\t\t}\n\t},\n\tstartSection: function( process, commentName ) {\n\t\tvar newSection = new HTMLSection(process);\n\t\tthis.last().add({\n\t\t\tcomment: commentName || \"#section\",\n\t\t\tcallbacks: [newSection.targetCallback]\n\t\t});\n\t\tthis.last().add({\n\t\t\tcomment: \"can-end-placeholder\"\n\t\t});\n\t\t// adding a section within a section ...\n\t\t// the stack has section ...\n\t\tthis.stack.push(newSection);\n\t},\n\tendSection: function(){\n\t\tthis.last().compile();\n\t\treturn this.stack.pop();\n\t},\n\tinverse: function(){\n\t\tthis.last().inverse();\n\t},\n\tcompile: function(){\n\t\tvar compiled = this.stack.pop().compile();\n\t\t// ignore observations here. the render fn\n\t\t// itself doesn't need to be observable.\n\t\treturn utils$1.makeView( compiled.hydrate.bind(compiled) );\n\t},\n\tpush: function(chars){\n\t\tthis.last().push(chars);\n\t},\n\tpop: function(){\n\t\treturn this.last().pop();\n\t},\n\tremoveCurrentNode: function() {\n\t\tthis.last().removeCurrentNode();\n\t}\n});\n\nvar HTMLSection = function(process){\n\tthis.data = \"targetData\";\n\tthis.targetData = [];\n\t// A record of what targetData element we are within.\n\tthis.targetStack = [];\n\tvar self = this;\n\tthis.targetCallback = function(scope){\n\t\tprocess.call(this,\n\t\t\tscope,\n\t\t\tself.compiled.hydrate.bind(self.compiled),\n\t\t\tself.inverseCompiled && self.inverseCompiled.hydrate.bind(self.inverseCompiled) ) ;\n\t};\n};\ncanAssign_1_3_3_canAssign(HTMLSection.prototype,{\n\tinverse: function(){\n\t\tthis.inverseData = [];\n\t\tthis.data = \"inverseData\";\n\t},\n\t// Adds a DOM node.\n\tpush: function(data){\n\t\tthis.add(data);\n\t\tthis.targetStack.push(data);\n\t},\n\tpop: function(){\n\t\treturn this.targetStack.pop();\n\t},\n\tadd: function(data){\n\t\tif(typeof data === \"string\"){\n\t\t\tdata = decodeHTML(data);\n\t\t}\n\t\tif(this.targetStack.length) {\n\t\t\tlast(this.targetStack).children.push(data);\n\t\t} else {\n\t\t\tthis[this.data].push(data);\n\t\t}\n\t},\n\tcompile: function(){\n\t\tthis.compiled = canViewTarget_5_0_0_canViewTarget(this.targetData, document$1());\n\t\tif(this.inverseData) {\n\t\t\tthis.inverseCompiled = canViewTarget_5_0_0_canViewTarget(this.inverseData, document$1());\n\t\t\tdelete this.inverseData;\n\t\t}\n\t\tthis.targetStack = this.targetData = null;\n\t\treturn this.compiled;\n\t},\n\tremoveCurrentNode: function() {\n\t\tvar children = this.children();\n\t\treturn children.pop();\n\t},\n\tchildren: function(){\n\t\tif(this.targetStack.length) {\n\t\t\treturn last(this.targetStack).children;\n\t\t} else {\n\t\t\treturn this[this.data];\n\t\t}\n\t},\n\t// Returns if a section is empty\n\tisEmpty: function(){\n\t\treturn !this.targetData.length;\n\t}\n});\nHTMLSectionBuilder.HTMLSection = HTMLSection;\n\nvar html_section = HTMLSectionBuilder;\n\nvar canDomData_1_0_3_canDomData = createCommonjsModule(function (module) {\n\n\nvar isEmptyObject = function(obj){\n\t/* jshint -W098 */\n\tfor(var prop in obj) {\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nvar data = new WeakMap();\n\n// delete this node's `data`\n// returns true if the node was deleted.\nvar deleteNode = function(node) {\n\tvar nodeDeleted = false;\n\tif (data.has(node)) {\n\t\tnodeDeleted = true;\n\t\tdata.delete(node);\n\t}\n\treturn nodeDeleted;\n};\n\nvar setData = function(node, name, value) {\n\tvar store = data.get(node);\n\tif (store === undefined) {\n\t\tstore = {};\n\t\tdata.set(node, store);\n\t}\n\tif (name !== undefined) {\n\t\tstore[name] = value;\n\t}\n\treturn store;\n};\n\n/*\n * Core of domData that does not depend on mutationDocument\n * This is separated in order to prevent circular dependencies\n */\nvar domData = {\n\t_data: data,\n\n\tget: function(node, key) {\n\t\tvar store = data.get(node);\n\t\treturn key === undefined ? store : store && store[key];\n\t},\n\n\tset: setData,\n\n\tclean: function(node, prop) {\n\t\tvar itemData = data.get(node);\n\t\tif (itemData && itemData[prop]) {\n\t\t\tdelete itemData[prop];\n\t\t}\n\t\tif (isEmptyObject(itemData)) {\n\t\t\tdeleteNode(node);\n\t\t}\n\t},\n\n\tdelete: deleteNode\n};\n\nif (canNamespace_1_0_0_canNamespace.domData) {\n\tthrow new Error(\"You can't have two versions of can-dom-data, check your dependencies\");\n} else {\n\tmodule.exports = canNamespace_1_0_0_canNamespace.domData = domData;\n}\n});\n\nvar slice$1 = [].slice;\n// a b c\n// a b c d\n// [[2,0, d]]\n\n\nfunction defaultIdentity(a, b){\n return a === b;\n}\n\nfunction makeIdentityFromMapSchema(typeSchema) {\n if(typeSchema.identity && typeSchema.identity.length) {\n return function identityCheck(a, b) {\n var aId = canReflect_1_19_2_canReflect.getIdentity(a, typeSchema),\n bId = canReflect_1_19_2_canReflect.getIdentity(b, typeSchema);\n return aId === bId;\n };\n } else {\n return defaultIdentity;\n }\n}\n\nfunction makeIdentityFromListSchema(listSchema) {\n return listSchema.values != null ?\n makeIdentityFromMapSchema( canReflect_1_19_2_canReflect.getSchema(listSchema.values) ) :\n defaultIdentity;\n}\n\nfunction makeIdentity(oldList, oldListLength) {\n var listSchema = canReflect_1_19_2_canReflect.getSchema(oldList),\n typeSchema;\n if(listSchema != null) {\n if(listSchema.values != null) {\n typeSchema = canReflect_1_19_2_canReflect.getSchema(listSchema.values);\n } else {\n return defaultIdentity;\n }\n }\n if(typeSchema == null && oldListLength > 0) {\n typeSchema = canReflect_1_19_2_canReflect.getSchema( canReflect_1_19_2_canReflect.getKeyValue(oldList, 0) );\n }\n if(typeSchema) {\n return makeIdentityFromMapSchema(typeSchema);\n } else {\n return defaultIdentity;\n }\n}\n\n\n\nfunction reverseDiff(oldDiffStopIndex, newDiffStopIndex, oldList, newList, identity) {\n\tvar oldIndex = oldList.length - 1,\n\t\tnewIndex = newList.length - 1;\n\n\twhile( oldIndex > oldDiffStopIndex && newIndex > newDiffStopIndex) {\n\t\tvar oldItem = oldList[oldIndex],\n\t\t\tnewItem = newList[newIndex];\n\n\t\tif( identity( oldItem, newItem, oldIndex ) ) {\n\t\t\toldIndex--;\n\t\t\tnewIndex--;\n\t\t\tcontinue;\n\t\t} else {\n\t\t\t// use newIndex because it reflects any deletions\n\t\t\treturn [{\n type: \"splice\",\n\t\t\t\tindex: newDiffStopIndex,\n\t\t\t \tdeleteCount: (oldIndex-oldDiffStopIndex+1),\n\t\t\t \tinsert: slice$1.call(newList, newDiffStopIndex,newIndex+1)\n\t\t\t}];\n\t\t}\n\t}\n\t// if we've reached of either the new or old list\n\t// we simply return\n\treturn [{\n type: \"splice\",\n\t\tindex: newDiffStopIndex,\n\t\tdeleteCount: (oldIndex-oldDiffStopIndex+1),\n\t\tinsert: slice$1.call(newList, newDiffStopIndex,newIndex+1)\n\t}];\n\n}\n\n/**\n * @module {function} can-diff/list/list\n * @parent can-diff\n *\n * @description Return a difference of two lists.\n *\n * @signature `diffList( oldList, newList, [identity] )`\n *\n * Compares two lists and produces a sequence of patches that can be applied to make `oldList` take\n * the shape of `newList`.\n *\n * ```js\n * var diffList = require(\"can-diff/list/list\");\n *\n * console.log(diff([1], [1, 2])); // -> [{type: \"splice\", index: 1, deleteCount: 0, insert: [2]}]\n * console.log(diff([1, 2], [1])); // -> [{type: \"splice\", index: 1, deleteCount: 1, insert: []}]\n *\n * // with an optional identity function:\n * diffList(\n * [{id:1},{id:2}],\n * [{id:1},{id:3}],\n * (a,b) => a.id === b.id\n * ); // -> [{type: \"splice\", index: 1, deleteCount: 1, insert: [{id:3}]}]\n * ```\n *\n * The patch algorithm is linear with respect to the length of the lists and therefore does not produce a\n * [perfect edit distance](https://en.wikipedia.org/wiki/Edit_distance) (which would be at least quadratic).\n *\n * It is designed to work with most common list change scenarios, when items are inserted or removed\n * to a list (as opposed to moved with in the last).\n *\n * For example, it is able to produce the following patches:\n *\n * ```js\n * diffList(\n * [\"a\",\"b\",\"c\",\"d\"],\n * [\"a\",\"b\",\"X\",\"Y\",\"c\",\"d\"]\n * ); // -> [{type: \"splice\", index: 2, deleteCount: 0, insert: [\"X\",\"Y\"]}]\n * ```\n *\n * @param {ArrayLike} oldList The source array or list to diff from.\n * @param {ArrayLike} newList The array or list to diff to.\n * @param {function|can-reflect.getSchema} schemaOrIdentity An optional identity function or a schema with\n * an identity property for comparing elements. If a `schemaOrIdentity` is not provided, the schema of\n * the `oldList` will be used. If a schema can not be found, items a default identity function will be created\n * that checks if the two values are strictly equal `===`.\n * @return {Array} An array of [can-symbol/types/Patch] objects representing the differences\n *\n * Returns the difference between two ArrayLike objects (that have nonnegative\n * integer keys and the `length` property) as an array of patch objects.\n *\n * A patch object returned by this function has the following properties:\n * - **type**: the type of patch (`\"splice\"`).\n * - **index**: the index of newList where the patch begins\n * - **deleteCount**: the number of items deleted from that index in newList\n * - **insert**: an Array of items newly inserted at that index in newList\n *\n * Patches should be applied in the order they are returned.\n */\n\nvar list = function(oldList, newList, schemaOrIdentity){\n var oldIndex = 0,\n\t\tnewIndex = 0,\n\t\toldLength = canReflect_1_19_2_canReflect.size( oldList ),\n\t\tnewLength = canReflect_1_19_2_canReflect.size( newList ),\n\t\tpatches = [];\n\n var schemaType = typeof schemaOrIdentity,\n identity;\n if(schemaType === \"function\") {\n identity = schemaOrIdentity;\n } else if(schemaOrIdentity != null) {\n if(schemaOrIdentity.type === \"map\") {\n identity = makeIdentityFromMapSchema(schemaOrIdentity);\n } else {\n identity = makeIdentityFromListSchema(schemaOrIdentity);\n }\n } else {\n identity = makeIdentity(oldList, oldLength);\n }\n\n\n\n\twhile(oldIndex < oldLength && newIndex < newLength) {\n\t\tvar oldItem = oldList[oldIndex],\n\t\t\tnewItem = newList[newIndex];\n\n\t\tif( identity( oldItem, newItem, oldIndex ) ) {\n\t\t\toldIndex++;\n\t\t\tnewIndex++;\n\t\t\tcontinue;\n\t\t}\n\t\t// look for single insert, does the next newList item equal the current oldList.\n\t\t// 1 2 3\n\t\t// 1 2 4 3\n\t\tif( newIndex+1 < newLength && identity( oldItem, newList[newIndex+1], oldIndex ) ) {\n\t\t\tpatches.push({index: newIndex, deleteCount: 0, insert: [ newList[newIndex] ], type: \"splice\"});\n\t\t\toldIndex++;\n\t\t\tnewIndex += 2;\n\t\t\tcontinue;\n\t\t}\n\t\t// look for single removal, does the next item in the oldList equal the current newList item.\n\t\t// 1 2 3\n\t\t// 1 3\n\t\telse if( oldIndex+1 < oldLength && identity( oldList[oldIndex+1], newItem, oldIndex+1 ) ) {\n\t\t\tpatches.push({index: newIndex, deleteCount: 1, insert: [], type: \"splice\"});\n\t\t\toldIndex += 2;\n\t\t\tnewIndex++;\n\t\t\tcontinue;\n\t\t}\n\t\t// just clean up the rest and exit\n\t\t// 1 2 3\n\t\t// 1 2 5 6 7\n\t\telse {\n\t\t\t// iterate backwards to `newIndex`\n\t\t\t// \"a\", \"b\", \"c\", \"d\", \"e\"\n\t\t\t// \"a\", \"x\", \"y\", \"z\", \"e\"\n\t\t\t// -> {}\n\t\t\tpatches.push.apply(patches, reverseDiff(oldIndex, newIndex , oldList, newList, identity) );\n\n\n\t\t\treturn patches;\n\t\t}\n\t}\n\tif( (newIndex === newLength) && (oldIndex === oldLength) ) {\n\t\treturn patches;\n\t}\n\t// a b\n\t// a b c d e\n\tpatches.push(\n\t\t\t\t{type: \"splice\", index: newIndex,\n\t\t\t\t deleteCount: oldLength-oldIndex,\n\t\t\t\t insert: slice$1.call(newList, newIndex) } );\n\n\treturn patches;\n};\n\nvar global$1 = global_1();\n\n\n\n\n\n\n\n\n\nvar xmlnsAttrNamespaceURI = \"http://www.w3.org/2000/xmlns/\";\nvar xlinkHrefAttrNamespaceURI = \"http://www.w3.org/1999/xlink\";\nvar attrsNamespacesURI = {\n\t'xmlns': xmlnsAttrNamespaceURI,\n\t'xlink:href': xlinkHrefAttrNamespaceURI\n};\n\n\nvar formElements = {\"INPUT\": true, \"TEXTAREA\": true, \"SELECT\": true, \"BUTTON\": true},\n\t// Used to convert values to strings.\n\ttoString$1 = function(value){\n\t\tif(value == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn \"\"+value;\n\t\t}\n\t},\n\tisSVG = function(el){\n\t\treturn el.namespaceURI === \"http://www.w3.org/2000/svg\";\n\t},\n\ttruthy = function() { return true; },\n\tgetSpecialTest = function(special){\n\t\treturn (special && special.test) || truthy;\n\t},\n\tpropProp = function(prop, obj){\n\t\tobj = obj || {};\n\t\tobj.get = function(){\n\t\t\treturn this[prop];\n\t\t};\n\t\tobj.set = function(value){\n\t\t\tif(this[prop] !== value) {\n\t\t\t\tthis[prop] = value;\n\t\t\t}\n\t\t};\n\t\treturn obj;\n\t},\n\tbooleanProp = function(prop){\n\t\treturn {\n\t\t\tisBoolean: true,\n\t\t\tset: function(value){\n\t\t\t\tif(prop in this) {\n\t\t\t\t\tthis[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(this, prop, \"\");\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: function(){\n\t\t\t\tthis[prop] = false;\n\t\t\t}\n\t\t};\n\t},\n\tsetupMO = function(el, callback){\n\t\tvar attrMO = canDomData_1_0_3_canDomData.get(el, \"attrMO\");\n\t\tif(!attrMO) {\n\t\t\tvar onMutation = function(){\n\t\t\t\tcallback.call(el);\n\t\t\t};\n\t\t\tvar MO = mutationObserver();\n\t\t\tif(MO) {\n\t\t\t\tvar observer = new MO(onMutation);\n\t\t\t\tobserver.observe(el, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t});\n\t\t\t\tcanDomData_1_0_3_canDomData.set(el, \"attrMO\", observer);\n\t\t\t} else {\n\t\t\t\tcanDomData_1_0_3_canDomData.set(el, \"attrMO\", true);\n\t\t\t\tcanDomData_1_0_3_canDomData.set(el, \"canBindingCallback\", {onMutation: onMutation});\n\t\t\t}\n\t\t}\n\t},\n\t_findOptionToSelect = function (parent, value) {\n\t\tvar child = parent.firstChild;\n\t\twhile (child) {\n\t\t\tif (child.nodeName === \"OPTION\" && value === child.value) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t\tif (child.nodeName === \"OPTGROUP\") {\n\t\t\t\tvar groupChild = _findOptionToSelect(child, value);\n\t\t\t\tif (groupChild) {\n\t\t\t\t\treturn groupChild;\n\t\t\t\t}\n\t\t\t}\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t},\n\tsetChildOptions = function(el, value){\n\t\tvar option;\n\t\tif (value != null) {\n\t\t\toption = _findOptionToSelect(el, value);\n\t\t}\n\t\tif (option) {\n\t\t\toption.selected = true;\n\t\t} else {\n\t\t\tel.selectedIndex = -1;\n\t\t}\n\t},\n\tforEachOption = function (parent, fn) {\n\t\tvar child = parent.firstChild;\n\t\twhile (child) {\n\t\t\tif (child.nodeName === \"OPTION\") {\n\t\t\t\tfn(child);\n\t\t\t}\n\t\t\tif (child.nodeName === \"OPTGROUP\") {\n\t\t\t\tforEachOption(child, fn);\n\t\t\t}\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t},\n\tcollectSelectedOptions = function (parent) {\n\t\tvar selectedValues = [];\n\t\tforEachOption(parent, function (option) {\n\t\t\tif (option.selected) {\n\t\t\t\tselectedValues.push(option.value);\n\t\t\t}\n\t\t});\n\t\treturn selectedValues;\n\t},\n\tmarkSelectedOptions = function (parent, values) {\n\t\tforEachOption(parent, function (option) {\n\t\t\toption.selected = values.indexOf(option.value) !== -1;\n\t\t});\n\t},\n\t// Create a handler, only once, that will set the child options any time\n\t// the select's value changes.\n\tsetChildOptionsOnChange = function(select, aEL){\n\t\tvar handler = canDomData_1_0_3_canDomData.get(select, \"attrSetChildOptions\");\n\t\tif(handler) {\n\t\t\treturn Function.prototype;\n\t\t}\n\t\thandler = function(){\n\t\t\tsetChildOptions(select, select.value);\n\t\t};\n\t\tcanDomData_1_0_3_canDomData.set(select, \"attrSetChildOptions\", handler);\n\t\taEL.call(select, \"change\", handler);\n\t\treturn function(rEL){\n\t\t\tcanDomData_1_0_3_canDomData.clean(select, \"attrSetChildOptions\");\n\t\t\trEL.call(select, \"change\", handler);\n\t\t};\n\t},\n\t// cache of rules already calculated by `attr.getRule`\n\tbehaviorRules = new Map(),\n\t// # isPropWritable\n\t// check if a property is writable on an element by finding its property descriptor\n\t// on the element or its prototype chain\n\tisPropWritable = function(el, prop) {\n\t\t var desc = Object.getOwnPropertyDescriptor(el, prop);\n\n\t\t if (desc) {\n\t\t\t\t return desc.writable || desc.set;\n\t\t } else {\n\t\t\t\t var proto = Object.getPrototypeOf(el);\n\t\t\t\t if (proto) {\n\t\t\t\t\t\t return isPropWritable(proto, prop);\n\t\t\t\t }\n\t\t }\n\n\t\t return false;\n\t},\n\t// # cacheRule\n\t// add a rule to the rules Map so it does not need to be calculated more than once\n\tcacheRule = function(el, attrOrPropName, rule) {\n\t\t var rulesForElementType;\n\n\t\t rulesForElementType = behaviorRules.get(el.prototype);\n\n\t\t if (!rulesForElementType) {\n\t\t\t\t rulesForElementType = {};\n\t\t\t\t behaviorRules.set(el.constructor, rulesForElementType);\n\t\t }\n\n\t\t rulesForElementType[attrOrPropName] = rule;\n\n\t\t return rule;\n\t};\n\nvar specialAttributes = {\n\tchecked: {\n\t\tget: function(){\n\t\t\treturn this.checked;\n\t\t},\n\t\tset: function(val){\n\t\t\t// - `set( truthy )` => TRUE\n\t\t\t// - `set( \"\" )` => TRUE\n\t\t\t// - `set()` => TRUE\n\t\t\t// - `set(undefined)` => false.\n\t\t\tvar notFalse = !!val || val === \"\" || arguments.length === 0;\n\t\t\tthis.checked = notFalse;\n\t\t\tif(notFalse && this.type === \"radio\") {\n\t\t\t\tthis.defaultChecked = true;\n\t\t\t}\n\t\t},\n\t\tremove: function(){\n\t\t\tthis.checked = false;\n\t\t},\n\t\ttest: function(){\n\t\t\treturn this.nodeName === \"INPUT\";\n\t\t}\n\t},\n\t\"class\": {\n\t\tget: function(){\n\t\t\tif(isSVG(this)) {\n\t\t\t\treturn this.getAttribute(\"class\");\n\t\t\t}\n\t\t\treturn this.className;\n\t\t},\n\t\tset: function(val){\n\t\t\tval = val || \"\";\n\n\t\t\tif(isSVG(this)) {\n\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(this, \"class\", \"\" + val);\n\t\t\t} else {\n\t\t\t\tthis.className = val;\n\t\t\t}\n\t\t}\n\t},\n\tdisabled: booleanProp(\"disabled\"),\n\tfocused: {\n\t\tget: function(){\n\t\t\treturn this === document.activeElement;\n\t\t},\n\t\tset: function(val){\n\t\t\tvar cur = attr.get(this, \"focused\");\n\t\t\tvar docEl = this.ownerDocument.documentElement;\n\t\t\tvar element = this;\n\t\t\tfunction focusTask() {\n\t\t\t\tif (val) {\n\t\t\t\t\telement.focus();\n\t\t\t\t} else {\n\t\t\t\t\telement.blur();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cur !== val) {\n\t\t\t\tif (!docEl.contains(element)) {\n\t\t\t\t\tvar connectionDisposal = canDomMutate_2_0_9_canDomMutate.onNodeConnected(element, function () {\n\t\t\t\t\t\tconnectionDisposal();\n\t\t\t\t\t\tfocusTask();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// THIS MIGHT NEED TO BE PUT IN THE MUTATE QUEUE\n\t\t\t\t\tcanQueues_1_3_2_canQueues.enqueueByQueue({\n\t\t\t\t\t\tmutate: [focusTask]\n\t\t\t\t\t}, null, []);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\taddEventListener: function(eventName, handler, aEL){\n\t\t\taEL.call(this, \"focus\", handler);\n\t\t\taEL.call(this, \"blur\", handler);\n\t\t\treturn function(rEL){\n\t\t\t\trEL.call(this, \"focus\", handler);\n\t\t\t\trEL.call(this, \"blur\", handler);\n\t\t\t};\n\t\t},\n\t\ttest: function(){\n\t\t\treturn this.nodeName === \"INPUT\";\n\t\t}\n\t},\n\t\"for\": propProp(\"htmlFor\"),\n\tinnertext: propProp(\"innerText\"),\n\tinnerhtml: propProp(\"innerHTML\"),\n\tinnerHTML: propProp(\"innerHTML\", {\n\t\taddEventListener: function(eventName, handler, aEL){\n\t\t\tvar handlers = [];\n\t\t\tvar el = this;\n\t\t\t[\"change\", \"blur\"].forEach(function(eventName){\n\t\t\t\tvar localHandler = function(){\n\t\t\t\t\thandler.apply(this, arguments);\n\t\t\t\t};\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.addEventListener(el, eventName, localHandler);\n\t\t\t\thandlers.push([eventName, localHandler]);\n\t\t\t});\n\n\t\t\treturn function(rEL){\n\t\t\t\thandlers.forEach( function(info){\n\t\t\t\t\trEL.call(el, info[0], info[1]);\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\t}),\n\trequired: booleanProp(\"required\"),\n\treadonly: booleanProp(\"readOnly\"),\n\tselected: {\n\t\tget: function(){\n\t\t\treturn this.selected;\n\t\t},\n\t\tset: function(val){\n\t\t\tval = !!val;\n\t\t\tcanDomData_1_0_3_canDomData.set(this, \"lastSetValue\", val);\n\t\t\tthis.selected = val;\n\t\t},\n\t\taddEventListener: function(eventName, handler, aEL){\n\t\t\tvar option = this;\n\t\t\tvar select = this.parentNode;\n\t\t\tvar lastVal = option.selected;\n\t\t\tvar localHandler = function(changeEvent){\n\t\t\t\tvar curVal = option.selected;\n\t\t\t\tlastVal = canDomData_1_0_3_canDomData.get(option, \"lastSetValue\") || lastVal;\n\t\t\t\tif(curVal !== lastVal) {\n\t\t\t\t\tlastVal = curVal;\n\n\t\t\t\t\tcanDomEvents_1_3_13_canDomEvents.dispatch(option, eventName);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar removeChangeHandler = setChildOptionsOnChange(select, aEL);\n\t\t\tcanDomEvents_1_3_13_canDomEvents.addEventListener(select, \"change\", localHandler);\n\t\t\taEL.call(option, eventName, handler);\n\n\t\t\treturn function(rEL){\n\t\t\t\tremoveChangeHandler(rEL);\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.removeEventListener(select, \"change\", localHandler);\n\t\t\t\trEL.call(option, eventName, handler);\n\t\t\t};\n\t\t},\n\t\ttest: function(){\n\t\t\treturn this.nodeName === \"OPTION\" && this.parentNode &&\n\t\t\t\tthis.parentNode.nodeName === \"SELECT\";\n\t\t}\n\t},\n\tstyle: {\n\t\tset: (function () {\n\t\t\tvar el = global$1.document && document$1().createElement(\"div\");\n\t\t\tif ( el && el.style && (\"cssText\" in el.style) ) {\n\t\t\t\treturn function (val) {\n\t\t\t\t\tthis.style.cssText = (val || \"\");\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn function (val) {\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(this, \"style\", val);\n\t\t\t\t};\n\t\t\t}\n\t\t})()\n\t},\n\ttextcontent: propProp(\"textContent\"),\n\tvalue: {\n\t\tget: function(){\n\t\t\tvar value = this.value;\n\t\t\tif(this.nodeName === \"SELECT\") {\n\t\t\t\tif((\"selectedIndex\" in this) && this.selectedIndex === -1) {\n\t\t\t\t\tvalue = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\n\t\t},\n\t\tset: function(value){\n\t\t\tvar providedValue = value;\n\t\t\tvar nodeName = this.nodeName.toLowerCase();\n\t\t\tif(nodeName === \"input\" || nodeName === \"textarea\") {\n\t\t\t\t// Do some input types support non string values?\n\t\t\t\tvalue = toString$1(value);\n\t\t\t}\n\t\t\tif(this.value !== value || nodeName === \"option\") {\n\t\t\t\tthis.value = value;\n\t\t\t}\n\t\t\tif (nodeName === \"input\" || nodeName === \"textarea\") {\n\t\t\t\tthis.defaultValue = value;\n\t\t\t}\n\t\t\tif(nodeName === \"select\") {\n\t\t\t\tcanDomData_1_0_3_canDomData.set(this, \"attrValueLastVal\", value);\n\t\t\t\t//If it's null then special case\n\t\t\t\tsetChildOptions(this, value === null ? value : this.value);\n\n\t\t\t\t// If not in the document reset the value when inserted.\n\t\t\t\tvar docEl = this.ownerDocument.documentElement;\n\t\t\t\tif(!docEl.contains(this)) {\n\t\t\t\t\tvar select = this;\n\t\t\t\t\tvar connectionDisposal = canDomMutate_2_0_9_canDomMutate.onNodeConnected(select, function () {\n\t\t\t\t\t\tconnectionDisposal();\n\t\t\t\t\t\tsetChildOptions(select, value === null ? value : select.value);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// MO handler is only set up **ONCE**\n\t\t\t\tsetupMO(this, function(){\n\t\t\t\t\tvar value = canDomData_1_0_3_canDomData.get(this, \"attrValueLastVal\");\n\t\t\t\t\tattr.set(this, \"value\", value);\n\t\t\t\t\tcanDomEvents_1_3_13_canDomEvents.dispatch(this, \"change\");\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Warnings area\n\t\t\t//!steal-remove-start\n\t\t\tif(process.env.NODE_ENV !== \"production\") {\n\t\t\t\tvar settingADateInputToADate = nodeName === \"input\" && this.type === \"date\" && (providedValue instanceof Date);\n\t\t\t\tif(settingADateInputToADate) {\n\t\t\t\t\tdev.warn(\"Binding a Date to the \\\"value\\\" property on an will not work as expected. Use valueAsDate:bind instead. See https://canjs.com/doc/guides/forms.html#Dateinput for more information.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t},\n\t\ttest: function(){\n\t\t\treturn formElements[this.nodeName];\n\t\t}\n\t},\n\tvalues: {\n\t\tget: function(){\n\t\t\treturn collectSelectedOptions(this);\n\t\t},\n\t\tset: function(values){\n\t\t\tvalues = values || [];\n\n\t\t\t// set new DOM state\n\t\t\tmarkSelectedOptions(this, values);\n\n\t\t\t// store new DOM state\n\t\t\tcanDomData_1_0_3_canDomData.set(this, \"stickyValues\", attr.get(this,\"values\") );\n\n\t\t\t// MO handler is only set up **ONCE**\n\t\t\t// TODO: should this be moved into addEventListener?\n\t\t\tsetupMO(this, function(){\n\n\t\t\t\t// Get the previous sticky state\n\t\t\t\tvar previousValues = canDomData_1_0_3_canDomData.get(this,\n\t\t\t\t\t\"stickyValues\");\n\n\t\t\t\t// Set DOM to previous sticky state\n\t\t\t\tattr.set(this, \"values\", previousValues);\n\n\t\t\t\t// Get the new result after trying to maintain the sticky state\n\t\t\t\tvar currentValues = canDomData_1_0_3_canDomData.get(this,\n\t\t\t\t\t\"stickyValues\");\n\n\t\t\t\t// If there are changes, trigger a `values` event.\n\t\t\t\tvar changes = list(previousValues.slice().sort(),\n\t\t\t\t\tcurrentValues.slice().sort());\n\n\t\t\t\tif (changes.length) {\n\t\t\t\t\tcanDomEvents_1_3_13_canDomEvents.dispatch(this, \"values\");\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\taddEventListener: function(eventName, handler, aEL){\n\t\t\tvar localHandler = function(){\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.dispatch(this, \"values\");\n\t\t\t};\n\n\t\t\tcanDomEvents_1_3_13_canDomEvents.addEventListener(this, \"change\", localHandler);\n\t\t\taEL.call(this, eventName, handler);\n\n\t\t\treturn function(rEL){\n\t\t\t\tcanDomEvents_1_3_13_canDomEvents.removeEventListener(this, \"change\", localHandler);\n\t\t\t\trEL.call(this, eventName, handler);\n\t\t\t};\n\t\t}\n\t}\n};\n\nvar attr = {\n\t// cached rules (stored on `attr` for testing purposes)\n\trules: behaviorRules,\n\n\t// special attribute behaviors (stored on `attr` for testing purposes)\n\tspecialAttributes: specialAttributes,\n\n\t// # attr.getRule\n\t//\n\t// get the behavior rule for an attribute or property on an element\n\t//\n\t// Rule precendence:\n\t// 1. \"special\" behaviors - use the special behavior getter/setter\n\t// 2. writable properties - read and write as a property\n\t// 3. all others - read and write as an attribute\n\t//\n\t// Once rule is determined it will be cached for all elements of the same type\n\t// so that it does not need to be calculated again\n\tgetRule: function(el, attrOrPropName) {\n\t\tvar special = specialAttributes[attrOrPropName];\n\t\t// always use \"special\" if available\n\t\t// these are not cached since they would have to be cached separately\n\t\t// for each element type and it is faster to just look up in the\n\t\t// specialAttributes object\n\t\tif (special) {\n\t\t\treturn special;\n\t\t}\n\n\t\t// next use rules cached in a previous call to getRule\n\t\tvar rulesForElementType = behaviorRules.get(el.constructor);\n\t\tvar cached = rulesForElementType && rulesForElementType[attrOrPropName];\n\n\t\tif (cached) {\n\t\t\treturn cached;\n\t\t}\n\n\t\t// if the element doesn't have a property of this name, it must be an attribute\n\t\tif (!(attrOrPropName in el)) {\n\t\t\treturn this.attribute(attrOrPropName);\n\t\t}\n\n\t\t// if there is a property, check if it is writable\n\t\tvar newRule = isPropWritable(el, attrOrPropName) ?\n\t\t\tthis.property(attrOrPropName) :\n\t\t\tthis.attribute(attrOrPropName);\n\n\t\t// cache the new rule and return it\n\t\treturn cacheRule(el, attrOrPropName, newRule);\n\t},\n\n\tattribute: function(attrName) {\n\t\treturn {\n\t\t\tget: function() {\n\t\t\t\treturn this.getAttribute(attrName);\n\t\t\t},\n\t\t\tset: function(val) {\n\t\t\t\tif (attrsNamespacesURI[attrName]) {\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttributeNS.call(this, attrsNamespacesURI[attrName], attrName, val);\n\t\t\t\t} else {\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(this, attrName, val);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t},\n\n\tproperty: function(propName) {\n\t\treturn {\n\t\t\tget: function() {\n\t\t\t\treturn this[propName];\n\t\t\t},\n\t\t\tset: function(val) {\n\t\t\t\tthis[propName] = val;\n\t\t\t}\n\t\t};\n\t},\n\n\tfindSpecialListener: function(attributeName) {\n\t\treturn specialAttributes[attributeName] && specialAttributes[attributeName].addEventListener;\n\t},\n\n\tsetAttrOrProp: function(el, attrName, val){\n\t\treturn this.set(el, attrName, val);\n\t},\n\t// ## attr.set\n\t// Set the value an attribute on an element.\n\tset: function (el, attrName, val) {\n\t\tvar rule = this.getRule(el, attrName);\n\t\tvar setter = rule && rule.set;\n\n\t\tif (setter) {\n\t\t\treturn setter.call(el, val);\n\t\t}\n\t},\n\t// ## attr.get\n\t// Gets the value of an attribute or property.\n\t// First checks if the property is an `specialAttributes` and if so calls the special getter.\n\t// Then checks if the attribute or property is a property on the element.\n\t// Otherwise uses `getAttribute` to retrieve the value.\n\tget: function (el, attrName) {\n\t\tvar rule = this.getRule(el, attrName);\n\t\tvar getter = rule && rule.get;\n\n\t\tif (getter) {\n\t\t\treturn rule.test ?\n\t\t\t\trule.test.call(el) && getter.call(el) :\n\t\t\t\tgetter.call(el);\n\t\t}\n\t},\n\t// ## attr.remove\n\t// Removes an attribute from an element. First checks specialAttributes to see if the attribute is special and has a setter. If so calls the setter with `undefined`. Otherwise `removeAttribute` is used.\n\t// If the attribute previously had a value and the browser doesn't support MutationObservers we then trigger an \"attributes\" event.\n\tremove: function (el, attrName) {\n\t\tattrName = attrName.toLowerCase();\n\t\tvar special = specialAttributes[attrName];\n\t\tvar setter = special && special.set;\n\t\tvar remover = special && special.remove;\n\t\tvar test = getSpecialTest(special);\n\n\t\tif(typeof remover === \"function\" && test.call(el)) {\n\t\t\tremover.call(el);\n\t\t} else if(typeof setter === \"function\" && test.call(el)) {\n\t\t\tsetter.call(el, undefined);\n\t\t} else {\n\t\t\tcanDomMutate_2_0_9_node.removeAttribute.call(el, attrName);\n\t\t}\n\t}\n};\n\nvar canAttributeObservable_2_0_2_behaviors = attr;\n\nvar setElementSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.setElement\");\nvar elementSymbol = canSymbol_1_7_0_canSymbol.for(\"can.element\");\n\nfunction ListenUntilRemovedAndInitialize(\n\tobservable,\n\thandler,\n\tplaceholder,\n\tqueueName,\n\thandlerName\n) {\n\tthis.observable = observable;\n\tthis.handler = handler;\n\tthis.placeholder = placeholder;\n\tthis.queueName = queueName;\n\tthis.handler[elementSymbol] = placeholder;\n\n\tif( observable[setElementSymbol$2] ) {\n\t\tobservable[setElementSymbol$2](placeholder);\n\t} else {\n\t\tconsole.warn(\"no can.setElement symbol on observable\", observable);\n\t}\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\t// register that the handler changes the parent element\n\t\tcanReflect_1_19_2_canReflect.assignSymbols(handler, {\n\t\t\t\"can.getChangesDependencyRecord\": function() {\n\t\t\t\tvar s = new Set();\n\t\t\t\ts.add(placeholder);\n\t\t\t\treturn {\n\t\t\t\t\tvalueDependencies: s\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\tObject.defineProperty(handler, \"name\", {\n\t\t\tvalue: handlerName,\n\t\t});\n\n\t}\n\t//!steal-remove-end\n\n\tthis.setup();\n}\nListenUntilRemovedAndInitialize.prototype.setup = function() {\n\t// reinsertion case, not applicable during initial setup\n\tif(this.setupNodeReinserted) {\n\t\t// do not set up again if disconnected\n\t\tif(!canDomMutate_2_0_9_IsConnected.isConnected(this.placeholder)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.setupNodeReinserted();\n\t}\n\tthis.teardownNodeRemoved = canDomMutate_2_0_9_canDomMutate.onNodeRemoved(this.placeholder,\n\t\tthis.teardown.bind(this));\n\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tcanReflectDependencies_1_1_2_canReflectDependencies.addMutatedBy(this.placeholder, this.observable);\n\t}\n\t//!steal-remove-end\n\n\tcanReflect_1_19_2_canReflect.onValue(this.observable, this.handler, this.queueName);\n\tthis.handler( canReflect_1_19_2_canReflect.getValue(this.observable) );\n\n};\nListenUntilRemovedAndInitialize.prototype.teardown = function(){\n\t// do not teardown if still connected.\n\tif(canDomMutate_2_0_9_IsConnected.isConnected(this.placeholder)) {\n\t\treturn;\n\t}\n\tthis.teardownNodeRemoved();\n\tthis.setupNodeReinserted = canDomMutate_2_0_9_canDomMutate.onNodeInserted(this.placeholder,\n\t\tthis.setup.bind(this));\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tcanReflectDependencies_1_1_2_canReflectDependencies.deleteMutatedBy(this.placeholder, this.observable);\n\t}\n\t//!steal-remove-end\n\tcanReflect_1_19_2_canReflect.offValue(this.observable, this.handler, this.queueName);\n};\n\n\nvar helpers$2 = {\n\trange: {\n\t\tcreate: function(el, rangeName){\n\t\t\tvar start, end, next;\n\n\t\t\tif(el.nodeType === Node.COMMENT_NODE) {\n\t\t\t\tstart = el;\n\t\t\t\tnext = el.nextSibling;\n\t\t\t\tif(next && next.nodeType === Node.COMMENT_NODE && next.nodeValue === \"can-end-placeholder\") {\n\t\t\t\t\tend = next;\n\t\t\t\t\tend.nodeValue = \"/\" + (start.nodeValue = rangeName);\n\t\t\t\t} else {\n\t\t\t\t\tdev.warn(\"can-view-live: creating an end comment for \", rangeName, el);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdev.warn(\"can-view-live: forcing a comment range for \", rangeName, el);\n\t\t\t\tstart = el.ownerDocument.createComment( rangeName );\n\t\t\t\tel.parentNode.replaceChild( start, el );\n\t\t\t}\n\n\t\t\tif(!end) {\n\t\t\t\tend = el.ownerDocument.createComment( \"/\" + rangeName );\n\t\t\t\tstart.parentNode.insertBefore(end, start.nextSibling);\n\t\t\t}\n\n\t\t\treturn {start: start, end: end};\n\t\t},\n\t\tremove: function ( range ) {\n\t\t\t// TODO: Ideally this would be able to remove from the end, but\n\t\t\t// dispatch in the right order.\n\t\t\t// For now, we might want to remove nodes in the right order.\n\t\t\tvar parentNode = range.start.parentNode,\n\t\t\t\tcur = range.end.previousSibling,\n\t\t\t\tremove;\n\t\t\twhile(cur && cur !== range.start) {\n\t\t\t\tremove = cur;\n\t\t\t\tcur = cur.previousSibling;\n\t\t\t\tcanDomMutate_2_0_9_node.removeChild.call(parentNode, remove );\n\t\t\t}\n\n\t\t\tcanDomMutate_2_0_9_canDomMutate.flushRecords();\n\t\t},\n\n\t\tupdate: function ( range, frag ) {\n\t\t\tvar parentNode = range.start.parentNode;\n\t\t\tif(parentNode) {\n\t\t\t\tcanDomMutate_2_0_9_node.insertBefore.call(parentNode, frag, range.end);\n\t\t\t\t// this makes it so `connected` events will be called immediately\n\t\t\t\tcanDomMutate_2_0_9_canDomMutate.flushRecords();\n\t\t\t}\n\t\t}\n\t},\n\tListenUntilRemovedAndInitialize: ListenUntilRemovedAndInitialize,\n\tgetAttributeParts: function(newVal) {\n\t\tvar attrs = {},\n\t\t\tattr;\n\t\tcanViewParser_4_1_3_canViewParser.parseAttrs(newVal, {\n\t\t\tattrStart: function(name) {\n\t\t\t\tattrs[name] = \"\";\n\t\t\t\tattr = name;\n\t\t\t},\n\t\t\tattrValue: function(value) {\n\t\t\t\tattrs[attr] += value;\n\t\t\t},\n\t\t\tattrEnd: function() {}\n\t\t});\n\t\treturn attrs;\n\t},\n\t// #### addTextNodeIfNoChildren\n\t// Append an empty text node to a parent with no children;\n\t// do nothing if the parent already has children.\n\taddTextNodeIfNoChildren: function(frag) {\n\t\tif (!frag.firstChild) {\n\t\t\tfrag.appendChild(frag.ownerDocument.createTextNode(\"\"));\n\t\t}\n\t},\n\t// #### makeString\n\t// any -> string converter (including nullish)\n\tmakeString: function(txt) {\n\t\treturn txt == null ? \"\" : \"\" + txt;\n\t}\n};\n\n/**\n * @function can-view-live.attr attr\n * @parent can-view-live\n *\n * @signature `live.attr(el, attributeName, observable)`\n *\n * Keep an attribute live to a [can-reflect]-ed observable.\n *\n * ```js\n * var div = document.createElement('div');\n * var value = new SimpleObservable(\"foo bar\");\n * live.attr(div,\"class\", value);\n * ```\n *\n * @param {HTMLElement} el The element whos attribute will be kept live.\n * @param {String} attributeName The attribute name.\n * @param {Object} observable An observable value.\n *\n * @body\n *\n * ## How it works\n *\n * This listens for the changes in the observable and uses those changes to\n * set the specified attribute.\n */\nvar attr_1 = function(el, attributeName, compute) {\n\tvar handlerName = \"\";\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\t// register that the handler changes the parent element\n\t\thandlerName = \"live.attr update::\"+canReflect_1_19_2_canReflect.getName(compute);\n\t}\n\t//!steal-remove-end\n\n\tnew helpers$2.ListenUntilRemovedAndInitialize(compute,\n\t\t\tfunction liveUpdateAttr(newVal) {\n\t\t\t\tcanAttributeObservable_2_0_2_behaviors.set(el,attributeName, newVal);\n\t\t\t},\n\t\t\tel,\n\t\t\t\"dom\",\n\t\t\thandlerName\n\t\t);\n};\n\n// This provides live binding for stache attributes.\n\n\n\n\n\n\nvar attrs = function(el, compute, scope, options) {\n\tvar handlerName = \"\";\n\tif (!canReflect_1_19_2_canReflect.isObservableLike(compute)) {\n\t\t// Non-live case (`compute` was not a compute):\n\t\t// set all attributes on the element and don't\n\t\t// worry about setting up live binding since there\n\t\t// is not compute to bind on.\n\t\tvar attrs = helpers$2.getAttributeParts(compute);\n\t\tfor (var name in attrs) {\n\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(el, name, attrs[name]);\n\t\t}\n\t\treturn;\n\t}\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\thandlerName = \"live.attrs update::\"+canReflect_1_19_2_canReflect.getName(compute);\n\t}\n\t//!steal-remove-end\n\n\n\t// last set of attributes\n\tvar oldAttrs = {};\n\n\n\tnew helpers$2.ListenUntilRemovedAndInitialize(compute,\n\t\tfunction canViewLive_updateAttributes(newVal) {\n\t\t\tvar newAttrs = helpers$2.getAttributeParts(newVal),\n\t\t\t\tname;\n\t\t\tfor (name in newAttrs) {\n\t\t\t\tvar newValue = newAttrs[name],\n\t\t\t\t\t// `oldAttrs` was set on the last run of setAttrs in this context\n\t\t\t\t\t// (for this element and compute)\n\t\t\t\t\toldValue = oldAttrs[name];\n\t\t\t\t// Only fire a callback\n\t\t\t\t// if the value of the attribute has changed\n\t\t\t\tif (newValue !== oldValue) {\n\t\t\t\t\t// set on DOM attributes (dispatches an \"attributes\" event as well)\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(el, name, newValue);\n\t\t\t\t\t// get registered callback for attribute name and fire\n\t\t\t\t\tvar callback = canViewCallbacks_5_0_0_canViewCallbacks.attr(name);\n\t\t\t\t\tif (callback) {\n\t\t\t\t\t\tcallback(el, {\n\t\t\t\t\t\t\tattributeName: name,\n\t\t\t\t\t\t\tscope: scope,\n\t\t\t\t\t\t\toptions: options\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// remove key found in new attrs from old attrs\n\t\t\t\tdelete oldAttrs[name];\n\t\t\t}\n\t\t\t// any attrs left at this point are not set on the element now,\n\t\t\t// so remove them.\n\t\t\tfor (name in oldAttrs) {\n\t\t\t\tcanDomMutate_2_0_9_node.removeAttribute.call(el, name);\n\t\t\t}\n\t\t\toldAttrs = newAttrs;\n\t\t},\n\t\tel,\n\t\t\"dom\",\n\t\thandlerName);\n\n};\n\nvar viewInsertSymbol = canSymbol_1_7_0_canSymbol.for(\"can.viewInsert\");\n\nfunction makeCommentFragment(comment) {\n\t\tvar doc = document$1();\n\t\treturn canFragment_1_3_1_canFragment([\n\t\t\tdoc.createComment(comment),\n\t\t\tdoc.createComment(\"can-end-placeholder\")\n\t\t]);\n}\n\n/**\n * @function can-view-live.html html\n * @parent can-view-live\n * @release 2.0.4\n *\n * Live binds a compute's value to a collection of elements.\n *\n * @signature `live.html(el, compute, [parentNode])`\n *\n * `live.html` is used to setup incremental live-binding on a block of html.\n *\n * ```js\n * // a compute that changes its list\n * var greeting = compute(function(){\n * return \"Welcome \"+me.attr(\"name\")+\"\"\n * });\n *\n * var placeholder = document.createTextNode(\" \");\n * $(\"#greeting\").append(placeholder);\n *\n * live.html(placeholder, greeting);\n * ```\n *\n * @param {HTMLElement} el An html element to replace with the live-section.\n *\n * @param {can.compute} compute A [can.compute] whose value is HTML.\n *\n * @param {HTMLElement} [parentNode] An overwritable parentNode if `el`'s parent is\n * a documentFragment.\n *\n *\n */\nvar html = function(el, compute, viewInsertSymbolOptions) {\n\n\tvar observableName = \"\";\n\tvar updateRange = helpers$2.range.update;\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\t// register that the handler changes the parent element\n\t\tupdateRange = helpers$2.range.update.bind(null);\n\t\tobservableName = canReflect_1_19_2_canReflect.getName(compute);\n\t\tObject.defineProperty(updateRange, \"name\", {\n\t\t\tvalue: \"live.html update::\"+observableName,\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tif (el.nodeType !== Node.COMMENT_NODE) {\n\t\tvar commentFrag = makeCommentFragment(observableName);\n\t\tvar startCommentNode = commentFrag.firstChild;\n\t\tel.parentNode.replaceChild(commentFrag, el);\n\t\tel = startCommentNode;\n\t}\n\n\t// replace element with a comment node\n\tvar range = helpers$2.range.create(el, observableName);\n\n\tvar useQueue = false;\n\tnew helpers$2.ListenUntilRemovedAndInitialize(compute,\n\t\tfunction canViewLive_updateHTML(val) {\n\n\t\t\t// If val has the can.viewInsert symbol, call it and get something usable for val back\n\t\t\tif (val && typeof val[viewInsertSymbol] === \"function\") {\n\t\t\t\tval = val[viewInsertSymbol](viewInsertSymbolOptions);\n\t\t\t}\n\n\t\t\tvar isFunction = typeof val === \"function\";\n\n\t\t\t// translate val into a document fragment if it's DOM-like\n\t\t\tvar frag = isFunction ?\n\t\t\t\tmakeCommentFragment(observableName) :\n\t\t\t\tcanFragment_1_3_1_canFragment(val);\n\n\t\t\tif(isFunction) {\n\t\t\t\tval(frag.firstChild);\n\t\t\t}\n\n\t\t\tif(useQueue === true) {\n\t\t\t\thelpers$2.range.remove(range);\n\t\t\t\tupdateRange(range, frag);\n\t\t\t} else {\n\t\t\t\thelpers$2.range.update(range, frag);\n\t\t\t\tuseQueue = true;\n\t\t\t}\n\t\t},\n\t\trange.start,\n\t\t\"dom\",\n\t\t\"live.html replace::\" + observableName);\n\n};\n\nvar onValueSymbol$3 = canSymbol_1_7_0_canSymbol.for(\"can.onValue\");\nvar offValueSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.offValue\");\nvar onPatchesSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.onPatches\");\nvar offPatchesSymbol = canSymbol_1_7_0_canSymbol.for(\"can.offPatches\");\n\n// Patcher takes a observable that might wrap a list type.\n// When the observable changes, it will diff, and emit patches,\n// and if the list emits patches, it will emit those too.\n// It is expected that only `domUI` handlers are registered.\n/*\nvar observable = new SimpleObservable( new DefineList([ \"a\", \"b\", \"c\" ]) )\nvar patcher = new Patcher(observable)\ncanReflect.onPatches( patcher,function(patches){\n console.log(patches) // a patch removing c, then a\n})\nvar newList = new DefineList([\"a\",\"b\"]);\nobservable.set(newList);\nnewList.unshift(\"X\");\n[\n {type: \"splice\", index: 2, deleteCount: 1}\n]\nvar patches2 = [\n {type: \"splice\", index: 0, deleteCount: 0, inserted: [\"X\"]}\n]\n */\nvar Patcher = function(observableOrList, priority) {\n\t// stores listeners for this patcher\n\tthis.handlers = new canKeyTree_1_2_2_canKeyTree([Object, Array], {\n\t\t// call setup when the first handler is bound\n\t\tonFirst: this.setup.bind(this),\n\t\t// call teardown when the last handler is removed\n\t\tonEmpty: this.teardown.bind(this)\n\t});\n\n\t// save this value observable or patch emitter (list)\n\tthis.observableOrList = observableOrList;\n\t// if we were passed an observable value that we need to read its array for changes\n\tthis.isObservableValue = canReflect_1_19_2_canReflect.isValueLike(this.observableOrList) || canReflect_1_19_2_canReflect.isObservableLike(this.observableOrList);\n\tif(this.isObservableValue) {\n\t this.priority = canReflect_1_19_2_canReflect.getPriority(observableOrList);\n\t} else {\n\t this.priority = priority || 0;\n\t}\n\tthis.onList = this.onList.bind(this);\n\tthis.onPatchesNotify = this.onPatchesNotify.bind(this);\n\t// needs to be unique so the derive queue doesn't only add one.\n\tthis.onPatchesDerive = this.onPatchesDerive.bind(this);\n\n\t// stores patches that have happened between notification and\n\t// when we queue the `onPatches` handlers in the `domUI` queue\n\tthis.patches = [];\n\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(this.onList, \"name\", {\n\t\t\tvalue: \"live.list new list::\"+canReflect_1_19_2_canReflect.getName(observableOrList),\n\t\t});\n\t\tObject.defineProperty(this.onPatchesNotify, \"name\", {\n\t\t\tvalue: \"live.list notify::\"+canReflect_1_19_2_canReflect.getName(observableOrList),\n\t\t});\n\t\tObject.defineProperty(this.onPatchesDerive, \"name\", {\n\t\t\tvalue: \"live.list derive::\"+canReflect_1_19_2_canReflect.getName(observableOrList),\n\t\t});\n\t}\n\t//!steal-remove-end\n};\n\n\nPatcher.prototype = {\n\tconstructor: Patcher,\n\tsetup: function() {\n\t\tif (this.observableOrList[onValueSymbol$3]) {\n\t\t\t// if we have an observable value, listen to when it changes to get a\n\t\t\t// new list.\n\t\t\tcanReflect_1_19_2_canReflect.onValue(this.observableOrList, this.onList, \"notify\");\n\t\t\t// listen on the current value (which shoudl be a list) if there is one\n\t\t\tthis.setupList(canReflect_1_19_2_canReflect.getValue(this.observableOrList));\n\t\t} else {\n\t\t\tthis.setupList(this.observableOrList);\n\t\t}\n\t},\n\tteardown: function() {\n\t\tif (this.observableOrList[offValueSymbol$1]) {\n\t\t\tcanReflect_1_19_2_canReflect.offValue(this.observableOrList, this.onList, \"notify\");\n\t\t}\n\t\tif (this.currentList && this.currentList[offPatchesSymbol]) {\n\t\t\tthis.currentList[offPatchesSymbol](this.onPatchesNotify, \"notify\");\n\t\t}\n\t},\n\t// listen to the list for patches\n\tsetupList: function(list$$1) {\n\t\tthis.currentList = list$$1;\n\t\tif (list$$1 && list$$1[onPatchesSymbol$1]) {\n\t\t\t// If observable, set up bindings on list changes\n\t\t\tlist$$1[onPatchesSymbol$1](this.onPatchesNotify, \"notify\");\n\t\t}\n\t},\n\t// when the list changes, teardown the old list bindings\n\t// and setup the new list\n\tonList: function onList(newList) {\n\t\tvar current = this.currentList || [];\n\t\tnewList = newList || [];\n\t\tif (current[offPatchesSymbol]) {\n\t\t\tcurrent[offPatchesSymbol](this.onPatchesNotify, \"notify\");\n\t\t}\n\t\tvar patches = list(current, newList);\n\t\tthis.currentList = newList;\n\t\tthis.onPatchesNotify(patches);\n\t\tif (newList[onPatchesSymbol$1]) {\n\t\t\t// If observable, set up bindings on list changes\n\t\t\tnewList[onPatchesSymbol$1](this.onPatchesNotify, \"notify\");\n\t\t}\n\t},\n\t// This is when we get notified of patches on the underlying list.\n\t// Save the patches and queue up a `derive` task that will\n\t// call `domUI` updates.\n\tonPatchesNotify: function onPatchesNotify(patches) {\n\t\t// we are going to collect all patches\n\t\tthis.patches.push.apply(this.patches, patches);\n\t\t// TODO: share priority\n\t\tcanQueues_1_3_2_canQueues.deriveQueue.enqueue(this.onPatchesDerive, this, [], {\n\t\t\tpriority: this.priority\n\t\t});\n\t},\n\t// Let handlers (which should only be registered in `domUI`) know about patches\n\t// that they can apply.\n\tonPatchesDerive: function onPatchesDerive() {\n\t\tvar patches = this.patches;\n\t\tthis.patches = [];\n\t\tcanQueues_1_3_2_canQueues.enqueueByQueue(this.handlers.getNode([]), this.currentList, [patches, this.currentList], null,[\"Apply patches\", patches]);\n\t}\n};\n\ncanReflect_1_19_2_canReflect.assignSymbols(Patcher.prototype, {\n\t\"can.onPatches\": function(handler, queue) {\n\t\tthis.handlers.add([queue || \"mutate\", handler]);\n\t},\n\t\"can.offPatches\": function(handler, queue) {\n\t\tthis.handlers.delete([queue || \"mutate\", handler]);\n\t}\n});\n\nvar patcher = Patcher;\n\nvar patchSort = function(patches) {\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tvar deletes =[],\n\t\t\tinserts = [],\n\t\t\tmoves = [];\n\t\tpatches.forEach(function(patch){\n\t\t\tif (patch.type === \"move\") {\n\t\t\t\tmoves.push(patch);\n\t\t\t} else {\n\t\t\t\tif (patch.deleteCount) {\n\t\t\t\t\tdeletes.push(patch);\n\t\t\t\t}\n\t\t\t\tif (patch.insert && patch.insert.length) {\n\t\t\t\t\tinserts.push(inserts);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif(deletes.length + inserts.length > 2) {\n\t\t\tconsole.error(\"unable to group patches\",patches);\n\t\t\tthrow new Error(\"unable to group patches\");\n\t\t}\n\t\tif(moves.length &&(deletes.length || inserts.length)) {\n\t\t\tconsole.error(\"unable to sort a move with a delete or insert\");\n\t\t\tthrow new Error(\"unable to sort a move with a delete or insert\");\n\t\t}\n\t}\n\t//!steal-remove-end\n\n\n\tvar splitPatches = [];\n\tpatches.forEach(function(patch){\n\t\tif (patch.type === \"move\") {\n\t\t\tsplitPatches.push( {patch: patch, kind: \"move\"} );\n\t\t} else {\n\t\t\tif (patch.deleteCount) {\n\t\t\t\tsplitPatches.push({\n\t\t\t\t\ttype: \"splice\",\n\t\t\t\t\tindex: patch.index,\n\t\t\t\t\tdeleteCount: patch.deleteCount,\n\t\t\t\t\tinsert: [],\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (patch.insert && patch.insert.length) {\n\t\t\t\tsplitPatches.push({\n\t\t\t\t\ttype: \"splice\",\n\t\t\t\t\tindex: patch.index,\n\t\t\t\t\tdeleteCount: 0,\n\t\t\t\t\tinsert: patch.insert\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\tif(patches.length !== 2) {\n\t\treturn patches;\n\t}\n\tvar first = splitPatches[0],\n\t\tsecond = splitPatches[1];\n\t// if insert before a delete\n\tif(first.insert && first.insert.length && second.deleteCount) {\n\t\t// lets swap the order.\n\t\tvar insert = first,\n\t\t\tremove = second;\n\t\tif(insert.index < remove.index) {\n\t\t\tremove.index = remove.index - insert.insert.length;\n\t\t} else if(insert.index > remove.index) {\n\t\t\tinsert.index = insert.index - remove.deleteCount;\n\t\t} else {\n\t\t\tthrow \"indexes the same!\"\n\t\t}\n\t\treturn [remove, insert];\n\t}\n\treturn patches;\n};\n\nfunction SetObservable(initialValue, setter) {\n\tthis.setter = setter;\n\n\tcanSimpleObservable_2_5_0_canSimpleObservable.call(this, initialValue);\n}\n\nSetObservable.prototype = Object.create(canSimpleObservable_2_5_0_canSimpleObservable.prototype);\nSetObservable.prototype.constructor = SetObservable;\nSetObservable.prototype.set = function(newVal) {\n\tthis.setter(newVal);\n};\n\n\ncanReflect_1_19_2_canReflect.assignSymbols(SetObservable.prototype, {\n\t\"can.setValue\": SetObservable.prototype.set\n});\n\nvar setObservable = SetObservable;\n\nvar splice = [].splice;\n\n// #### renderAndAddRangeNode\n// a helper function that renders something and adds its nodeLists to newNodeLists\n// in the right way for stache.\nvar renderAndAddRangeNode = function(render, context, args, document) {\n\t\t// call the renderer, passing in the new nodeList as the last argument\n\t\tvar itemHTML = render.apply(context, args.concat()),\n\t\t\t// and put the output into a document fragment\n\t\t\titemFrag = canFragment_1_3_1_canFragment(itemHTML);\n\n\t\tvar rangeNode = document.createTextNode(\"\");\n\t\titemFrag.appendChild(rangeNode);\n\t\treturn itemFrag;\n\t};\n\n\nfunction getFrag(first, last){\n\tvar frag = first.ownerDocument.createDocumentFragment();\n\tvar current,\n\t\tlastInserted;\n\t// hopefully this doesn't dispatch removed?\n\twhile(last !== first) {\n\t\tcurrent = last;\n\t\tlast = current.previousSibling;\n\t\tfrag.insertBefore(current, lastInserted);\n\t\tlastInserted = current;\n\t}\n\tfrag.insertBefore(last, lastInserted);\n\treturn frag;\n}\n\nvar onPatchesSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.onPatches\");\nvar offPatchesSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.offPatches\");\n\nfunction ListDOMPatcher(el, compute, render, context, falseyRender) {\n\tthis.patcher = new patcher(compute);\n\tvar observableName = canReflect_1_19_2_canReflect.getName(compute);\n\n\t// argument cleanup\n\n\t// function callback binding\n\n\t// argument saving -----\n\tthis.value = compute;\n\tthis.render = render;\n\tthis.context = context;\n\tthis.falseyRender = falseyRender;\n\tthis.range = helpers$2.range.create(el, observableName);\n\n\t// A mapping of indices to observables holding that index.\n\tthis.indexMap = [];\n\t// A mapping of each item's end node\n\tthis.itemEndNode = [];\n\n\t// A mapping of each item to its pending patches.\n\tthis.domQueue = [];\n\n\tthis.isValueLike = canReflect_1_19_2_canReflect.isValueLike(this.value);\n\tthis.isObservableLike = canReflect_1_19_2_canReflect.isObservableLike(this.value);\n\n\t// Setup binding and teardown to add and remove events\n\tthis.onPatches = this.onPatches.bind(this);\n\tthis.processDomQueue = this.processDomQueue.bind(this);\n\tthis.teardownValueBinding = this.teardownValueBinding.bind(this);\n\n\tthis.meta = {reasonLog: \"live.html add::\"+observableName, element: this.range.start};\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(this.onPatches, \"name\", {\n\t\t\tvalue: \"live.list update::\"+canReflect_1_19_2_canReflect.getName(compute),\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tthis.setupValueBinding();\n}\n\nvar onPatchesSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.onPatches\");\nvar offPatchesSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.offPatches\");\n\nListDOMPatcher.prototype = {\n\tsetupValueBinding: function() {\n\t\t// Teardown when the placeholder element is removed.\n\t\tthis.teardownNodeRemoved = canDomMutate_2_0_9_canDomMutate.onNodeRemoved(this.range.start, this.teardownValueBinding);\n\n\t\t// Listen to when the patcher produces patches.\n\t\tthis.patcher[onPatchesSymbol$2](this.onPatches, \"notify\");\n\n\t\t// Initialize with the patcher's value\n\t\tif (this.patcher.currentList && this.patcher.currentList.length) {\n\t\t\tthis.add(this.patcher.currentList, 0);\n\t\t} else {\n\t\t\tthis.addFalseyIfEmpty();\n\t\t}\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tcanReflectDependencies_1_1_2_canReflectDependencies.addMutatedBy(this.range.start, this.patcher.observableOrList);\n\t\t}\n\t\t//!steal-remove-end\n\t},\n\tteardownValueBinding: function() {\n\n\t\tthis.exit = true;\n\t\t// Stop listening for teardowns\n\t\tthis.teardownNodeRemoved();\n\t\tthis.patcher[offPatchesSymbol$1](this.onPatches, \"notify\");\n\t\t// Todo: I bet this is no longer necessary?\n\t\t//this.remove({\n\t\t//\tlength: this.patcher.currentList ? this.patcher.currentList.length : 0\n\t\t//}, 0, true);\n\t\t//!steal-remove-start\n\t\tif(process.env.NODE_ENV !== 'production') {\n\t\t\tcanReflectDependencies_1_1_2_canReflectDependencies.deleteMutatedBy(this.range.start, this.patcher.observableOrList);\n\t\t}\n\t\t//!steal-remove-end\n\t},\n\tonPatches: function ListDOMPatcher_onPatches(patches) {\n\t\tif (this.exit) {\n\t\t\treturn;\n\t\t}\n\t\tvar sortedPatches = [];\n\t\tpatches.forEach(function(patch) {\n\t\t\tsortedPatches.push.apply(sortedPatches, patchSort([patch]));\n\t\t});\n\n\t\t// adjust so things can happen\n\t\tfor (var i = 0, patchLen = sortedPatches.length; i < patchLen; i++) {\n\t\t\tvar patch = sortedPatches[i];\n\t\t\tif (patch.type === \"move\") {\n\t\t\t\tthis.addToDomQueue(\n\t\t\t\t\tthis.move,\n\t\t\t\t\t[patch.toIndex, patch.fromIndex]\n\t\t\t\t);\n\t\t\t} else if (patch.type === \"splice\") {\n\t\t\t\tif (patch.deleteCount) {\n\t\t\t\t\t// Remove any items scheduled for deletion from the patch.\n\t\t\t\t\tthis.addToDomQueue(this.remove, [{\n\t\t\t\t\t\tlength: patch.deleteCount\n\t\t\t\t\t}, patch.index]);\n\t\t\t\t}\n\t\t\t\tif (patch.insert && patch.insert.length) {\n\t\t\t\t\t// Insert any new items at the index\n\t\t\t\t\tthis.addToDomQueue(this.add, [patch.insert, patch.index]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// all other patch types are ignored\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t},\n\taddToDomQueue: function(fn, args) {\n\t\tthis.domQueue.push({\n\t\t\tfn: fn,\n\t\t\targs: args\n\t\t});\n\t\tcanQueues_1_3_2_canQueues.domQueue.enqueue(this.processDomQueue, this, [this.domQueue], this.meta);\n\t},\n\tprocessDomQueue: function() {\n\t\tthis.domQueue.forEach(function(queueItem) {\n\t\t\tvar fn = queueItem.fn;\n\t\t\tvar args = queueItem.args;\n\t\t\tfn.apply(this, args);\n\t\t}.bind(this));\n\t\tthis.domQueue = [];\n\t},\n\tadd: function(items, index) {\n\t\t//if (!afterPreviousEvents) {\n\t\t//\treturn;\n\t\t//}\n\t\t// Collect new html and mappings\n\t\tvar ownerDocument = this.range.start.ownerDocument,\n\t\t\tfrag = ownerDocument.createDocumentFragment(),\n\t\t\tnewEndNodes = [],\n\t\t\tnewIndicies = [],\n\t\t\trender = this.render,\n\t\t\tcontext = this.context;\n\t\t// For each new item,\n\t\titems.forEach( function(item, key) {\n\n\t\t\tvar itemIndex = new canSimpleObservable_2_5_0_canSimpleObservable(key + index),\n\t\t\t\titemCompute = new setObservable(item, function(newVal) {\n\t\t\t\t\tcanReflect_1_19_2_canReflect.setKeyValue(this.patcher.currentList, itemIndex.get(), newVal );\n\t\t\t\t}.bind(this)),\n\t\t\t\titemFrag = renderAndAddRangeNode(render, context, [itemCompute, itemIndex], ownerDocument);\n\n\t\t\tnewEndNodes.push(itemFrag.lastChild);\n\t\t\t// Hookup the fragment (which sets up child live-bindings) and\n\t\t\t// add it to the collection of all added elements.\n\t\t\tfrag.appendChild(itemFrag);\n\t\t\t// track indicies;\n\t\t\tnewIndicies.push(itemIndex);\n\t\t}, this);\n\t\t// The position of elements is always after the initial text placeholder node\n\n\t\t// TODO: this should probably happen earlier.\n\t\t// remove falsey if there's something there\n\t\tif (!this.indexMap.length) {\n\t\t\t// remove all leftover things\n\t\t\thelpers$2.range.remove(this.range);\n\t\t\tthis.itemEndNode = [];\n\t\t}\n\t\t// figure out where we are placing things.\n\t\tvar placeholder,\n\t\t\tendNodesLength = this.itemEndNode.length;\n\t\tif(index === endNodesLength ) {\n\t\t\tplaceholder = this.range.end;\n\t\t} else if(index === 0) {\n\t\t\tplaceholder = this.range.start.nextSibling;\n\t\t} else if(index < endNodesLength) {\n\t\t\tplaceholder = this.itemEndNode[index - 1].nextSibling;\n\t\t} else {\n\t\t\tthrow new Error(\"Unable to place item\");\n\t\t}\n\n\t\tcanDomMutate_2_0_9_node.insertBefore.call(placeholder.parentNode,frag,placeholder);\n\n\t\tsplice.apply(this.itemEndNode, [\n\t\t\tindex,\n\t\t\t0\n\t\t].concat(newEndNodes));\n\n\t\t// update indices after insert point\n\t\tsplice.apply(this.indexMap, [\n\t\t\tindex,\n\t\t\t0\n\t\t].concat(newIndicies));\n\n\t\tfor (var i = index + newIndicies.length, len = this.indexMap.length; i < len; i++) {\n\t\t\tthis.indexMap[i].set(i);\n\t\t}\n\t},\n\tremove: function(items, index) {\n\t\t//if (!afterPreviousEvents) {\n\t\t//\treturn;\n\t\t//}\n\n\t\t// If this is because an element was removed, we should\n\t\t// check to make sure the live elements are still in the page.\n\t\t// If we did this during a teardown, it would cause an infinite loop.\n\t\t//if (!duringTeardown && this.data.teardownCheck(this.placeholder.parentNode)) {\n\t\t//\treturn;\n\t\t//}\n\t\tif (index < 0) {\n\t\t\tindex = this.indexMap.length + index;\n\t\t}\n\t\tvar removeStart;\n\t\tvar removeEnd;\n\t\tvar removeCount = items.length;\n\t\tvar endIndex = index + removeCount - 1;\n\t\tif(index === 0) {\n\t\t\tremoveStart = this.range.start;\n\t\t} else {\n\t\t\tremoveStart = this.itemEndNode[index - 1];\n\t\t}\n\t\tremoveEnd = this.itemEndNode[endIndex].nextSibling;\n\n\t\tthis.itemEndNode.splice(index, items.length);\n\n\t\tif (removeStart && removeEnd) {\n\t\t\thelpers$2.range.remove({start: removeStart, end: removeEnd});\n\t\t}\n\n\t\tvar indexMap = this.indexMap;\n\n\t\t// update indices after remove point\n\t\tindexMap.splice(index, items.length);\n\t\tfor (var i = index, len = indexMap.length; i < len; i++) {\n\t\t\tindexMap[i].set(i);\n\t\t}\n\n\t\t// don't remove elements during teardown. Something else will probably be doing that.\n\t\tif (!this.exit) {\n\t\t\t// adds the falsey section if the list is empty\n\t\t\tthis.addFalseyIfEmpty();\n\t\t} else {\n\t\t\t// This probably isn't needed anymore as element removal will be propagated\n\t\t\t// nodeLists.unregister(this.masterNodeList);\n\t\t}\n\t},\n\t// #### addFalseyIfEmpty\n\t// Add the results of redering the \"falsey\" or inverse case render to the\n\t// master nodeList and the DOM if the live list is empty\n\taddFalseyIfEmpty: function() {\n\t\tif (this.falseyRender && this.indexMap.length === 0) {\n\t\t\t// If there are no items ... we should render the falsey template\n\t\t\tvar falseyFrag = renderAndAddRangeNode(this.falseyRender, this.currentList, [this.currentList], this.range.start.ownerDocument);\n\t\t\thelpers$2.range.update(this.range, falseyFrag);\n\t\t}\n\t},\n\tmove: function move(newIndex, currentIndex) {\n\t\t//if (!afterPreviousEvents) {\n\t\t//\treturn;\n\t\t//}\n\t\t// The position of elements is always after the initial text\n\t\t// placeholder node\n\n\n\t\tvar currentFirstNode,\n\t\t\tcurrentEndNode = this.itemEndNode[currentIndex];\n\t\tif( currentIndex > 0 ) {\n\t\t\tcurrentFirstNode = this.itemEndNode[currentIndex - 1].nextSibling;\n\t\t} else {\n\t\t\tcurrentFirstNode = this.range.start.nextSibling;\n\t\t}\n\t\tvar newIndexFirstNode;\n\t\tif (currentIndex < newIndex) {\n\t\t\t// we need to advance one spot, because removing at\n\t\t\t// current index will shift everything left\n\t\t\tnewIndexFirstNode = this.itemEndNode[newIndex].nextSibling;\n\t\t} else {\n\t\t\tif( newIndex > 0 ) {\n\t\t\t\tnewIndexFirstNode = this.itemEndNode[newIndex - 1].nextSibling;\n\t\t\t} else {\n\t\t\t\tnewIndexFirstNode = this.range.start.nextSibling;\n\t\t\t}\n\t\t}\n\t\t// need to put this at the newIndex\n\n\n\n\t\tvar frag = getFrag(currentFirstNode, currentEndNode);\n\t\tnewIndexFirstNode.parentNode.insertBefore(frag, newIndexFirstNode);\n\n\t\t// update endNodes\n\t\tthis.itemEndNode.splice(currentIndex, 1);\n\t\tthis.itemEndNode.splice(newIndex, 0,currentEndNode);\n\n\n\t\t// Update indexMap\n\t\tnewIndex = newIndex + 1;\n\t\tcurrentIndex = currentIndex + 1;\n\n\t\tvar indexMap = this.indexMap;\n\n\t\t// Convert back to a zero-based array index\n\t\tnewIndex = newIndex - 1;\n\t\tcurrentIndex = currentIndex - 1;\n\n\t\t// Grab the index compute from the `indexMap`\n\t\tvar indexCompute = indexMap[currentIndex];\n\n\t\t// Remove the index compute from the `indexMap`\n\t\t[].splice.apply(indexMap, [currentIndex, 1]);\n\n\t\t// Move the index compute to the correct index in the `indexMap`\n\t\t[].splice.apply(indexMap, [newIndex, 0, indexCompute]);\n\n\t\tvar i = Math.min(currentIndex, newIndex);\n\t\tvar len = indexMap.length;\n\n\t\tfor (len; i < len; i++) {\n\t\t\t// set each compute to have its current index in the map as its value\n\t\t\tindexMap[i].set(i);\n\t\t}\n\t}\n};\n\n\n\n/**\n * @function can-view-live.list list\n * @parent can-view-live\n * @release 2.0.4\n *\n * @signature `live.list(el, list, render, context)`\n *\n * Live binds a compute's list incrementally.\n *\n * ```js\n * // a compute that change's it's list\n * var todos = compute(function(){\n * return new Todo.List({page: can.route.attr(\"page\")})\n * })\n *\n * var placeholder = document.createTextNode(\" \");\n * $(\"ul#todos\").append(placeholder);\n *\n * can.view.live.list(\n * placeholder,\n * todos,\n * function(todo, index){\n * return \"
\"+todo.attr(\"name\")+\"
\"\n * });\n * ```\n *\n * @param {HTMLElement} el An html element to replace with the live-section.\n *\n * @param {Object} list An observable value or list type. If an observable value, it should contain\n * a falsey value or a list type.\n *\n * @param {function(this:*,*,index):String} render(index, index) A function that when called with\n * the incremental item to render and the index of the item in the list.\n *\n * @param {Object} context The `this` the `render` function will be called with.\n *\n * @body\n *\n * ## How it works\n *\n * If `list` is an observable value, `live.list` listens to changes in in that\n * observable value. It will generally change from one list type (often a list type that implements `onPatches`)\n * to another. When the value changes, a diff will be performed and the DOM updated. Also, `live.list`\n * will listen to `.onPatches` on the new list and apply any patches emitted from it.\n *\n *\n */\nvar list$1 = function(el, list, render, context, falseyRender) {\n\tnew ListDOMPatcher(el, list, render, context, falseyRender);\n};\n\n/**\n * @function can-view-live.text text\n * @parent can-view-live\n * @release 2.0.4\n *\n * @signature `live.text(el, compute)`\n *\n * Replaces one element with some content while keeping [can-view-live.nodeLists nodeLists] data correct.\n */\nvar text = function(el, compute) {\n\tvar handlerName = \"\";\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tif(arguments.length > 2) {\n\t\t\t// TODO: remove\n\t\t\tthrow new Error(\"too many arguments\");\n\n\t\t}\n\t\thandlerName = \"live.text update::\"+canReflect_1_19_2_canReflect.getName(compute);\n\t}\n\t//!steal-remove-end\n\n\t// TODO: we can remove this at some point\n\tif (el.nodeType !== Node.TEXT_NODE) {\n\t\tvar textNode;\n\n\t\ttextNode = document.createTextNode(\"\");\n\t\tel.parentNode.replaceChild(textNode, el);\n\t\tel = textNode;\n\n\t}\n\n\tnew helpers$2.ListenUntilRemovedAndInitialize(compute, function liveTextUpdateTextNode(newVal) {\n\t\tel.nodeValue = helpers$2.makeString(newVal);\n\t},\n\tel,\n\t\"dom\", // TODO: should this still be domUI?\n\thandlerName);\n};\n\n/**\t\n * @module {{}} can-view-live can-view-live\t\n * @parent can-views\t\n * @collection can-infrastructure\t\n * @package ./package.json\t\n *\t\n * Setup live-binding between the DOM and a compute manually.\t\n *\t\n * @option {Object} An object with the live-binding methods:\t\n * [can-view-live.html], [can-view-live.list], [can-view-live.text], and\t\n * [can-view-live.attr].\t\n *\n *\t\n * @body\t\n *\t\n * ## Use\t\n *\t\n * [can-view-live] is an object with utility methods for setting up\t\n * live-binding in relation to different parts of the DOM and DOM elements. For\t\n * example, to make an `
`'s text stay live with\t\n * a compute:\t\n *\t\n * ```js\t\n * var live = require(\"can-view-live\");\t\n * var text = canCompute(\"Hello World\");\t\n * var textNode = $(\"h2\").text(\" \")[0].childNodes[0];\t\n * live.text(textNode, text);\t\n * ```\t\n *\t\n */\nvar live = {};\nlive.attr = attr_1;\nlive.attrs = attrs;\nlive.html = html;\nlive.list = list$1;\nlive.text = text;\n\n\nvar canViewLive_5_0_5_canViewLive = live;\n\nvar noop = function(){};\n\nvar TextSectionBuilder = function(filename){\n\tif (filename) {\n\t\tthis.filename = filename;\n\t}\n\tthis.stack = [new TextSection()];\n};\n\ncanAssign_1_3_3_canAssign(TextSectionBuilder.prototype,utils$1.mixins);\n\ncanAssign_1_3_3_canAssign(TextSectionBuilder.prototype,{\n\t// Adds a subsection.\n\tstartSection: function(process){\n\t\tvar subSection = new TextSection();\n\t\tthis.last().add({process: process, truthy: subSection});\n\t\tthis.stack.push(subSection);\n\t},\n\tendSection: function(){\n\t\tthis.stack.pop();\n\t},\n\tinverse: function(){\n\t\tthis.stack.pop();\n\t\tvar falseySection = new TextSection();\n\t\tthis.last().last().falsey = falseySection;\n\t\tthis.stack.push(falseySection);\n\t},\n\tcompile: function(state){\n\n\t\tvar renderer = this.stack[0].compile();\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tObject.defineProperty(renderer,\"name\",{\n\t\t\t\tvalue: \"textSectionRenderer<\"+state.tag+\".\"+state.attr+\">\"\n\t\t\t});\n\t\t}\n\t\t//!steal-remove-end\n\n\t\treturn function(scope){\n\t\t\tfunction textSectionRender(){\n\t\t\t\treturn renderer(scope);\n\t\t\t}\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tObject.defineProperty(textSectionRender,\"name\",{\n\t\t\t\t\tvalue: \"textSectionRender<\"+state.tag+\".\"+state.attr+\">\"\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\tvar observation = new canObservation_4_2_0_canObservation(textSectionRender, null, {isObservable: false});\n\n\t\t\tcanReflect_1_19_2_canReflect.onValue(observation, noop);\n\n\t\t\tvar value = canReflect_1_19_2_canReflect.getValue(observation);\n\t\t\tif( canReflect_1_19_2_canReflect.valueHasDependencies( observation ) ) {\n\t\t\t\tif(state.textContentOnly) {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.text(this, observation);\n\t\t\t\t}\n\t\t\t\telse if(state.attr) {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attr(this, state.attr, observation);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attrs(this, observation, scope);\n\t\t\t\t}\n\t\t\t\tcanReflect_1_19_2_canReflect.offValue(observation, noop);\n\t\t\t} else {\n\t\t\t\tif(state.textContentOnly) {\n\t\t\t\t\tthis.nodeValue = value;\n\t\t\t\t}\n\t\t\t\telse if(state.attr) {\n\t\t\t\t\tcanDomMutate_2_0_9_node.setAttribute.call(this, state.attr, value);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attrs(this, value);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\n\nvar passTruthyFalsey = function(process, truthy, falsey){\n\treturn function(scope){\n\t\treturn process.call(this, scope, truthy, falsey);\n\t};\n};\n\nvar TextSection = function(){\n\tthis.values = [];\n};\n\ncanAssign_1_3_3_canAssign( TextSection.prototype, {\n\tadd: function(data){\n\t\tthis.values.push(data);\n\t},\n\tlast: function(){\n\t\treturn this.values[this.values.length - 1];\n\t},\n\tcompile: function(){\n\t\tvar values = this.values,\n\t\t\tlen = values.length;\n\n\t\tfor(var i = 0 ; i < len; i++) {\n\t\t\tvar value = this.values[i];\n\t\t\tif(typeof value === \"object\") {\n\t\t\t\tvalues[i] = passTruthyFalsey( value.process,\n\t\t\t\t value.truthy && value.truthy.compile(),\n\t\t\t\t value.falsey && value.falsey.compile());\n\t\t\t}\n\t\t}\n\n\t\treturn function(scope){\n\t\t\tvar txt = \"\",\n\t\t\t\tvalue;\n\t\t\tfor(var i = 0; i < len; i++){\n\t\t\t\tvalue = values[i];\n\t\t\t\ttxt += typeof value === \"string\" ? value : value.call(this, scope);\n\t\t\t}\n\t\t\treturn txt;\n\t\t};\n\t}\n});\n\nvar text_section = TextSectionBuilder;\n\n// ### Arg\n// `new Arg(Expression [,modifierOptions] )`\n// Used to identify an expression that should return a value.\nvar Arg = function(expression, modifiers){\n\tthis.expr = expression;\n\tthis.modifiers = modifiers || {};\n\tthis.isCompute = false;\n};\nArg.prototype.value = function(){\n\treturn this.expr.value.apply(this.expr, arguments);\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tArg.prototype.sourceText = function(){\n\t\treturn (this.modifiers.compute ? \"~\" : \"\")+ this.expr.sourceText();\n\t};\n}\n//!steal-remove-end\n\nvar arg = Arg;\n\n// ### Literal\n// For inline static values like `{{\"Hello World\"}}`\nvar Literal = function(value){\n\tthis._value = value;\n};\nLiteral.prototype.value = function(){\n\treturn this._value;\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tLiteral.prototype.sourceText = function(){\n\t\treturn JSON.stringify(this._value);\n\t};\n}\n//!steal-remove-end\n\nvar literal = Literal;\n\n// ## Helpers\n\nfunction getObservableValue_fromDynamicKey_fromObservable(key, root, helperOptions, readOptions) {\n\t// This needs to return something similar to a ScopeKeyData with intialValue and parentHasKey\n\tvar getKeys = function(){\n\t\treturn canStacheKey_1_4_3_canStacheKey.reads((\"\" + canReflect_1_19_2_canReflect.getValue(key)).replace(/\\./g, \"\\\\.\"));\n\t};\n\tvar parentHasKey;\n\tvar computeValue = new setter(function getDynamicKey() {\n\t\tvar readData = canStacheKey_1_4_3_canStacheKey.read( canReflect_1_19_2_canReflect.getValue(root) , getKeys());\n\t\tparentHasKey = readData.parentHasKey;\n\t\treturn readData.value;\n\t}, function setDynamicKey(newVal){\n\t\tcanStacheKey_1_4_3_canStacheKey.write(canReflect_1_19_2_canReflect.getValue(root), getKeys(), newVal);\n\t});\n\t// This prevents lazy evalutaion\n\tcanObservation_4_2_0_canObservation.temporarilyBind(computeValue);\n\n\t// peek so no observable that might call getObservableValue_fromDynamicKey_fromObservable will re-evaluate if computeValue changes.\n\tcomputeValue.initialValue = canObservationRecorder_1_3_1_canObservationRecorder.peekValue(computeValue);\n\tcomputeValue.parentHasKey = parentHasKey;\n\t// Todo:\n\t// 1. We should warn here if `initialValue` is undefined. We can expose the warning function\n\t// in can-view-scope and call it here.\n\t// 2. We should make this lazy if possible. We can do that by making getter/setters for\n\t// initialValue and parentHasKey (and possibly @@can.valueHasDependencies)\n\treturn computeValue;\n}\n\n// If not a Literal or an Arg, convert to an arg for caching.\nfunction convertToArgExpression(expr) {\n\tif(!(expr instanceof arg) && !(expr instanceof literal)) {\n\t\treturn new arg(expr);\n\t} else {\n\t\treturn expr;\n\t}\n}\n\nfunction toComputeOrValue(value) {\n\t// convert to non observable value\n\tif(canReflect_1_19_2_canReflect.isObservableLike(value)) {\n\t\t// we only want to do this for things that `should` have dependencies, but dont.\n\t\tif(canReflect_1_19_2_canReflect.isValueLike(value) && canReflect_1_19_2_canReflect.valueHasDependencies(value) === false) {\n\t\t\treturn canReflect_1_19_2_canReflect.getValue(value);\n\t\t}\n\t\t// if compute data\n\t\tif(value.compute) {\n\t\t\treturn value.compute;\n\t\t} else {\n\t\t\treturn canViewScope_4_13_7_makeComputeLike(value);\n\t\t}\n\t}\n\treturn value;\n}\n\n// try to make it a compute no matter what. This is useful for\n// ~ operator.\nfunction toCompute(value) {\n\tif(value) {\n\n\t\tif(value.isComputed) {\n\t\t\treturn value;\n\t\t}\n\t\tif(value.compute) {\n\t\t\treturn value.compute;\n\t\t} else {\n\t\t\treturn canViewScope_4_13_7_makeComputeLike(value);\n\t\t}\n\t}\n\treturn value;\n}\n\nvar expressionHelpers = {\n\tgetObservableValue_fromDynamicKey_fromObservable: getObservableValue_fromDynamicKey_fromObservable,\n\tconvertToArgExpression: convertToArgExpression,\n\ttoComputeOrValue: toComputeOrValue,\n\ttoCompute: toCompute\n};\n\nvar Hashes = function(hashes){\n\tthis.hashExprs = hashes;\n};\nHashes.prototype.value = function(scope, helperOptions){\n\tvar hash = {};\n\tfor(var prop in this.hashExprs) {\n\t\tvar val = expressionHelpers.convertToArgExpression(this.hashExprs[prop]),\n\t\t\tvalue = val.value.apply(val, arguments);\n\n\t\thash[prop] = {\n\t\t\tcall: !val.modifiers || !val.modifiers.compute,\n\t\t\tvalue: value\n\t\t};\n\t}\n\treturn new canObservation_4_2_0_canObservation(function(){\n\t\tvar finalHash = {};\n\t\tfor(var prop in hash) {\n\t\t\tfinalHash[prop] = hash[prop].call ? canReflect_1_19_2_canReflect.getValue( hash[prop].value ) : expressionHelpers.toComputeOrValue( hash[prop].value );\n\t\t}\n\t\treturn finalHash;\n\t});\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tHashes.prototype.sourceText = function(){\n\t\tvar hashes = [];\n\t\tcanReflect_1_19_2_canReflect.eachKey(this.hashExprs, function(expr, prop){\n\t\t\thashes.push( prop+\"=\"+expr.sourceText() );\n\t\t});\n\t\treturn hashes.join(\" \");\n\t};\n}\n//!steal-remove-end\n\nvar hashes = Hashes;\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tvar canSymbol = canSymbol_1_7_0_canSymbol;\n}\n//!steal-remove-end\n\n\n// ### Bracket\n// For accessing properties using bracket notation like `foo[bar]`\nvar Bracket = function (key, root, originalKey) {\n\tthis.root = root;\n\tthis.key = key;\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tthis[canSymbol.for(\"can-stache.originalKey\")] = originalKey;\n\t}\n\t//!steal-remove-end\n};\nBracket.prototype.value = function (scope, helpers) {\n\tvar root = this.root ? this.root.value(scope, helpers) : scope.peek(\"this\");\n\treturn expressionHelpers.getObservableValue_fromDynamicKey_fromObservable(this.key.value(scope, helpers), root, scope, helpers, {});\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tBracket.prototype.sourceText = function(){\n\t\tif(this.rootExpr) {\n\t\t\treturn this.rootExpr.sourceText()+\"[\"+this.key+\"]\";\n\t\t} else {\n\t\t\treturn \"[\"+this.key+\"]\";\n\t\t}\n\t};\n}\n//!steal-remove-end\n\nBracket.prototype.closingTag = function() {\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\treturn this[canSymbol.for('can-stache.originalKey')] || '';\n\t}\n\t//!steal-remove-end\n};\n\nvar bracket = Bracket;\n\nvar setIdentifier = function SetIdentifier(value){\n\tthis.value = value;\n};\n\nvar sourceTextSymbol = canSymbol_1_7_0_canSymbol.for(\"can-stache.sourceText\");\nvar isViewSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.isView\");\n\n\n\n// ### Call\n// `new Call( new Lookup(\"method\"), [new ScopeExpr(\"name\")], {})`\n// A call expression like `method(arg1, arg2)` that, by default,\n// calls `method` with non compute values.\nvar Call = function(methodExpression, argExpressions){\n\tthis.methodExpr = methodExpression;\n\tthis.argExprs = argExpressions.map(expressionHelpers.convertToArgExpression);\n};\nCall.prototype.args = function(scope, ignoreArgLookup) {\n\tvar hashExprs = {};\n\tvar args = [];\n\tvar gotIgnoreFunction = typeof ignoreArgLookup === \"function\";\n\n\tfor (var i = 0, len = this.argExprs.length; i < len; i++) {\n\t\tvar arg = this.argExprs[i];\n\t\tif(arg.expr instanceof hashes){\n\t\t\tcanAssign_1_3_3_canAssign(hashExprs, arg.expr.hashExprs);\n\t\t}\n\t\tif (!gotIgnoreFunction || !ignoreArgLookup(i)) {\n\t\t\tvar value = arg.value.apply(arg, arguments);\n\t\t\targs.push({\n\t\t\t\t// always do getValue unless compute is false\n\t\t\t\tcall: !arg.modifiers || !arg.modifiers.compute,\n\t\t\t\tvalue: value\n\t\t\t});\n\t\t}\n\t}\n\treturn function(doNotWrapArguments){\n\t\tvar finalArgs = [];\n\t\tif(canReflect_1_19_2_canReflect.size(hashExprs) > 0){\n\t\t\tfinalArgs.hashExprs = hashExprs;\n\t\t}\n\t\tfor(var i = 0, len = args.length; i < len; i++) {\n\t\t\tif (doNotWrapArguments) {\n\t\t\t\tfinalArgs[i] = args[i].value;\n\t\t\t} else {\n\t\t\t\tfinalArgs[i] = args[i].call ?\n\t\t\t\t\tcanReflect_1_19_2_canReflect.getValue( args[i].value ) :\n\t\t\t\t\texpressionHelpers.toCompute( args[i].value );\n\t\t\t}\n\t\t}\n\t\treturn finalArgs;\n\t};\n};\n\nCall.prototype.value = function(scope, helperOptions){\n\tvar callExpression = this;\n\n\t// proxyMethods must be false so that the `requiresOptionsArgument` and any\n\t// other flags stored on the function are preserved\n\tvar method = this.methodExpr.value(scope, { proxyMethods: false });\n\tcanObservation_4_2_0_canObservation.temporarilyBind(method);\n\tvar func = canReflect_1_19_2_canReflect.getValue( method );\n\n\tvar getArgs = callExpression.args(scope , func && func.ignoreArgLookup);\n\n\tvar computeFn = function(newVal){\n\t\tvar func = canReflect_1_19_2_canReflect.getValue( method );\n\t\tif(typeof func === \"function\") {\n\t\t\tif (canReflect_1_19_2_canReflect.isObservableLike(func)) {\n\t\t\t\tfunc = canReflect_1_19_2_canReflect.getValue(func);\n\t\t\t}\n\t\t\tvar args = getArgs(\n\t\t\t\tfunc.isLiveBound\n\t\t\t);\n\n\t\t\tif (func.requiresOptionsArgument) {\n\t\t\t\tif(args.hashExprs && helperOptions && helperOptions.exprData){\n\t\t\t\t\thelperOptions.exprData.hashExprs = args.hashExprs;\n\t\t\t\t}\n\t\t\t\t// For #581\n\t\t\t\tif(helperOptions !== undefined) {\n\t\t\t\t\targs.push(helperOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// we are calling a view!\n\t\t\tif(func[isViewSymbol$1] === true) {\n\t\t\t\t// if not a scope, we should create a scope that\n\t\t\t\t// includes the template scope\n\t\t\t\tif(!(args[0] instanceof canViewScope_4_13_7_canViewScope)){\n\t\t\t\t\targs[0] = scope.getTemplateContext().add(args[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(arguments.length) {\n\t\t\t\targs.unshift(new setIdentifier(newVal));\n\t\t\t}\n\n\t\t\t// if this is a call like `foo.bar()` the method.thisArg will be set to `foo`\n\t\t\t// for a call like `foo()`, method.thisArg will not be set and we will default\n\t\t\t// to setting the scope as the context of the function\n\t\t\treturn func.apply(method.thisArg || scope.peek(\"this\"), args);\n\t\t}\n\t};\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(computeFn, \"name\", {\n\t\t\tvalue: \"{{\" + this.sourceText() + \"}}\"\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\tif (helperOptions && helperOptions.doNotWrapInObservation) {\n\t\treturn computeFn();\n\t} else {\n\t\tvar computeValue = new setter(computeFn, computeFn);\n\n\t\treturn computeValue;\n\t}\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tCall.prototype.sourceText = function(){\n\t\tvar args = this.argExprs.map(function(arg){\n\t\t\treturn arg.sourceText();\n\t\t});\n\t\treturn this.methodExpr.sourceText()+\"(\"+args.join(\",\")+\")\";\n\t};\n}\n//!steal-remove-end\nCall.prototype.closingTag = function() {\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tif(this.methodExpr[sourceTextSymbol]) {\n\t\t\treturn this.methodExpr[sourceTextSymbol];\n\t\t}\n\t}\n\t//!steal-remove-end\n\treturn this.methodExpr.key;\n};\n\nvar call$1 = Call;\n\nvar Helper = function(methodExpression, argExpressions, hashExpressions){\n\tthis.methodExpr = methodExpression;\n\tthis.argExprs = argExpressions;\n\tthis.hashExprs = hashExpressions;\n\tthis.mode = null;\n};\nHelper.prototype.args = function(scope){\n\tvar args = [];\n\tfor(var i = 0, len = this.argExprs.length; i < len; i++) {\n\t\tvar arg = this.argExprs[i];\n\t\t// TODO: once we know the helper, we should be able to avoid compute conversion\n\t\targs.push( expressionHelpers.toComputeOrValue( arg.value.apply(arg, arguments) ) );\n\t}\n\treturn args;\n};\nHelper.prototype.hash = function(scope){\n\tvar hash = {};\n\tfor(var prop in this.hashExprs) {\n\t\tvar val = this.hashExprs[prop];\n\t\t// TODO: once we know the helper, we should be able to avoid compute conversion\n\t\thash[prop] = expressionHelpers.toComputeOrValue( val.value.apply(val, arguments) );\n\t}\n\treturn hash;\n};\n\nHelper.prototype.value = function(scope, helperOptions){\n\t// If a literal, this means it should be treated as a key. But helpers work this way for some reason.\n\t// TODO: fix parsing so numbers will also be assumed to be keys.\n\tvar methodKey = this.methodExpr instanceof literal ?\n\t\t\"\" + this.methodExpr._value :\n\t\tthis.methodExpr.key,\n\t\thelperInstance = this,\n\t\t// proxyMethods must be false so that the `requiresOptionsArgument` and any\n\t\t// other flags stored on the function are preserved\n\t\thelperFn = scope.computeData(methodKey, { proxyMethods: false }),\n\t\tinitialValue = helperFn && helperFn.initialValue,\n\t\tthisArg = helperFn && helperFn.thisArg;\n\n\tif (typeof initialValue === \"function\") {\n\t\thelperFn = function helperFn() {\n\t\t\tvar args = helperInstance.args(scope),\n\t\t\t\thelperOptionArg = canAssign_1_3_3_canAssign(canAssign_1_3_3_canAssign({}, helperOptions), {\n\t\t\t\t\thash: helperInstance.hash(scope),\n\t\t\t\t\texprData: helperInstance\n\t\t\t\t});\n\n\t\t\targs.push(helperOptionArg);\n\n\t\t\treturn initialValue.apply(thisArg || scope.peek(\"this\"), args);\n\t\t};\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tObject.defineProperty(helperFn, \"name\", {\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: canReflect_1_19_2_canReflect.getName(this)\n\t\t\t});\n\t\t}\n\t\t//!steal-remove-end\n\t}\n\t//!steal-remove-start\n\telse if (process.env.NODE_ENV !== 'production') {\n\t\tvar filename = scope.peek('scope.filename');\n\t\t\tvar lineNumber = scope.peek('scope.lineNumber');\n\t\t\tdev.warn(\n\t\t\t\t(filename ? filename + ':' : '') +\n\t\t\t\t(lineNumber ? lineNumber + ': ' : '') +\n\t\t\t\t'Unable to find helper \"' + methodKey + '\".');\n\t}\n\t//!steal-remove-end\n\n\treturn helperFn;\n};\n\nHelper.prototype.closingTag = function() {\n\treturn this.methodExpr.key;\n};\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tHelper.prototype.sourceText = function(){\n\t\tvar text = [this.methodExpr.sourceText()];\n\t\tif(this.argExprs.length) {\n\t\t\ttext.push( this.argExprs.map(function(arg){\n\t\t\t\treturn arg.sourceText();\n\t\t\t}).join(\" \") );\n\t\t}\n\t\tif(canReflect_1_19_2_canReflect.size(this.hashExprs) > 0){\n\t\t\ttext.push( hashes.prototype.sourceText.call(this) );\n\t\t}\n\t\treturn text.join(\" \");\n\t};\n\n\tcanReflect_1_19_2_canReflect.assignSymbols(Helper.prototype,{\n\t\t\"can.getName\": function() {\n\t\t\treturn canReflect_1_19_2_canReflect.getName(this.constructor) + \"{{\" + (this.sourceText()) + \"}}\";\n\t\t}\n\t});\n}\n//!steal-remove-end\n\nvar helper = Helper;\n\nvar sourceTextSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can-stache.sourceText\");\n\n\n// ### Lookup\n// `new Lookup(String, [Expression])`\n// Finds a value in the scope or a helper.\nvar Lookup = function(key, root, sourceText) {\n\tthis.key = key;\n\tthis.rootExpr = root;\n\tcanReflect_1_19_2_canReflect.setKeyValue(this, sourceTextSymbol$1, sourceText);\n};\nLookup.prototype.value = function(scope, readOptions){\n\tif (this.rootExpr) {\n\t\treturn expressionHelpers.getObservableValue_fromDynamicKey_fromObservable(this.key, this.rootExpr.value(scope), scope, {}, {});\n\t} else {\n\t\treturn scope.computeData(this.key, canAssign_1_3_3_canAssign({\n\t\t\twarnOnMissingKey: true\n\t\t},readOptions));\n\t}\n};\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tLookup.prototype.sourceText = function(){\n\t\tif(this[sourceTextSymbol$1]) {\n\t\t\treturn this[sourceTextSymbol$1];\n\t\t} else if(this.rootExpr) {\n\t\t\treturn this.rootExpr.sourceText()+\".\"+this.key;\n\t\t} else {\n\t\t\treturn this.key;\n\t\t}\n\t};\n}\n//!steal-remove-end\n\nvar lookup = Lookup;\n\n// ## Expression Types\n//\n// These expression types return a value. They are assembled by `expression.parse`.\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar last$1 = utils$1.last;\n\n\n\nvar sourceTextSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can-stache.sourceText\");\n\n// ### Hash\n// A placeholder. This isn't actually used.\nvar Hash = function(){ }; // jshint ignore:line\n\n// NAME - \\w\n// KEY - foo, foo.bar, foo@bar, %foo (special), &foo (references), ../foo, ./foo\n// ARG - ~KEY, KEY, CALLEXPRESSION, PRIMITIVE\n// CALLEXPRESSION = KEY(ARG,ARG, NAME=ARG)\n// HELPEREXPRESSION = KEY ARG ARG NAME=ARG\n// DOT .NAME\n// AT @NAME\n//\nvar keyRegExp = /[\\w\\.\\\\\\-_@\\/\\&%]+/,\n\ttokensRegExp = /('.*?'|\".*?\"|=|[\\w\\.\\\\\\-_@\\/*%\\$]+|[\\(\\)]|,|\\~|\\[|\\]\\s*|\\s*(?=\\[))/g,\n\tbracketSpaceRegExp = /\\]\\s+/,\n\tliteralRegExp = /^('.*?'|\".*?\"|-?[0-9]+\\.?[0-9]*|true|false|null|undefined)$/;\n\nvar isTokenKey = function(token){\n\treturn keyRegExp.test(token);\n};\n\nvar testDot = /^[\\.@]\\w/;\nvar isAddingToExpression = function(token) {\n\n\treturn isTokenKey(token) && testDot.test(token);\n};\n\nvar ensureChildren = function(type) {\n\tif(!type.children) {\n\t\ttype.children = [];\n\t}\n\treturn type;\n};\n\nvar Stack = function(){\n\n\tthis.root = {children: [], type: \"Root\"};\n\tthis.current = this.root;\n\tthis.stack = [this.root];\n};\ncanAssign_1_3_3_canAssign(Stack.prototype,{\n\ttop: function(){\n\t\treturn last$1(this.stack);\n\t},\n\tisRootTop: function(){\n\t\treturn this.top() === this.root;\n\t},\n\tpopTo: function(types){\n\t\tthis.popUntil(types);\n\t\tthis.pop();\n\t},\n\tpop: function() {\n\t\tif(!this.isRootTop()) {\n\t\t\tthis.stack.pop();\n\t\t}\n\t},\n\tfirst: function(types){\n\t\tvar curIndex = this.stack.length - 1;\n\t\twhile( curIndex > 0 && types.indexOf(this.stack[curIndex].type) === -1 ) {\n\t\t\tcurIndex--;\n\t\t}\n\t\treturn this.stack[curIndex];\n\t},\n\tfirstParent: function(types){\n\t\tvar curIndex = this.stack.length - 2;\n\t\twhile( curIndex > 0 && types.indexOf(this.stack[curIndex].type) === -1 ) {\n\t\t\tcurIndex--;\n\t\t}\n\t\treturn this.stack[curIndex];\n\t},\n\tpopUntil: function(types){\n\t\twhile( types.indexOf(this.top().type) === -1 && !this.isRootTop() ) {\n\t\t\tthis.stack.pop();\n\t\t}\n\t\treturn this.top();\n\t},\n\taddTo: function(types, type){\n\t\tvar cur = this.popUntil(types);\n\t\tensureChildren(cur).children.push(type);\n\t},\n\taddToAndPush: function(types, type){\n\t\tthis.addTo(types, type);\n\t\tthis.stack.push(type);\n\t},\n\tpush: function(type) {\n\t\tthis.stack.push(type);\n\t},\n\ttopLastChild: function(){\n\t\treturn last$1(this.top().children);\n\t},\n\treplaceTopLastChild: function(type){\n\t\tvar children = ensureChildren(this.top()).children;\n\t\tchildren.pop();\n\t\tchildren.push(type);\n\t\treturn type;\n\t},\n\treplaceTopLastChildAndPush: function(type) {\n\t\tthis.replaceTopLastChild(type);\n\t\tthis.stack.push(type);\n\t},\n\treplaceTopAndPush: function(type){\n\t\tvar children;\n\t\tif(this.top() === this.root) {\n\t\t\tchildren = ensureChildren(this.top()).children;\n\t\t} else {\n\t\t\tthis.stack.pop();\n\t\t\t// get parent and clean\n\t\t\tchildren = ensureChildren(this.top()).children;\n\t\t}\n\n\t\tchildren.pop();\n\t\tchildren.push(type);\n\t\tthis.stack.push(type);\n\t\treturn type;\n\t}\n});\n\n// converts\n// - \"../foo\" -> \"../@foo\",\n// - \"foo\" -> \"@foo\",\n// - \".foo\" -> \"@foo\",\n// - \"./foo\" -> \"./@foo\"\n// - \"foo.bar\" -> \"foo@bar\"\nvar convertKeyToLookup = function(key){\n\tvar lastPath = key.lastIndexOf(\"./\");\n\tvar lastDot = key.lastIndexOf(\".\");\n\tif(lastDot > lastPath) {\n\t\treturn key.substr(0, lastDot)+\"@\"+key.substr(lastDot+1);\n\t}\n\tvar firstNonPathCharIndex = lastPath === -1 ? 0 : lastPath+2;\n\tvar firstNonPathChar = key.charAt(firstNonPathCharIndex);\n\tif(firstNonPathChar === \".\" || firstNonPathChar === \"@\" ) {\n\t\treturn key.substr(0, firstNonPathCharIndex)+\"@\"+key.substr(firstNonPathCharIndex+1);\n\t} else {\n\t\treturn key.substr(0, firstNonPathCharIndex)+\"@\"+key.substr(firstNonPathCharIndex);\n\t}\n};\nvar convertToAtLookup = function(ast){\n\tif(ast.type === \"Lookup\") {\n\t\tcanReflect_1_19_2_canReflect.setKeyValue(ast, sourceTextSymbol$2, ast.key);\n\t\tast.key = convertKeyToLookup(ast.key);\n\t}\n\treturn ast;\n};\n\nvar convertToHelperIfTopIsLookup = function(stack){\n\tvar top = stack.top();\n\t// if two scopes, that means a helper\n\tif(top && top.type === \"Lookup\") {\n\n\t\tvar base = stack.stack[stack.stack.length - 2];\n\t\t// That lookup shouldn't be part of a Helper already or\n\t\tif(base.type !== \"Helper\" && base) {\n\t\t\tstack.replaceTopAndPush({\n\t\t\t\ttype: \"Helper\",\n\t\t\t\tmethod: top\n\t\t\t});\n\t\t}\n\t}\n};\n\nvar expression = {\n\ttoComputeOrValue: expressionHelpers.toComputeOrValue,\n\tconvertKeyToLookup: convertKeyToLookup,\n\n\tLiteral: literal,\n\tLookup: lookup,\n\tArg: arg,\n\tHash: Hash,\n\tHashes: hashes,\n\tCall: call$1,\n\tHelper: helper,\n\tBracket: bracket,\n\n\tSetIdentifier: setIdentifier,\n\ttokenize: function(expression){\n\t\tvar tokens = [];\n\t\t(expression.trim() + ' ').replace(tokensRegExp, function (whole, arg$$1) {\n\t\t\tif (bracketSpaceRegExp.test(arg$$1)) {\n\t\t\t\ttokens.push(arg$$1[0]);\n\t\t\t\ttokens.push(arg$$1.slice(1));\n\t\t\t} else {\n\t\t\t\ttokens.push(arg$$1);\n\t\t\t}\n\t\t});\n\t\treturn tokens;\n\t},\n\tlookupRules: {\n\t\t\"default\": function(ast, methodType, isArg){\n\t\t\treturn ast.type === \"Helper\" ? helper : lookup;\n\t\t},\n\t\t\"method\": function(ast, methodType, isArg){\n\t\t\treturn lookup;\n\t\t}\n\t},\n\tmethodRules: {\n\t\t\"default\": function(ast){\n\t\t\treturn ast.type === \"Call\" ? call$1 : helper;\n\t\t},\n\t\t\"call\": function(ast){\n\t\t\treturn call$1;\n\t\t}\n\t},\n\t// ## expression.parse\n\t//\n\t// - {String} expressionString - A stache expression like \"abc foo()\"\n\t// - {Object} options\n\t// - baseMethodType - Treat this like a Helper or Call. Default to \"Helper\"\n\t// - lookupRule - \"default\" or \"method\"\n\t// - methodRule - \"default\" or \"call\"\n\tparse: function(expressionString, options){\n\t\toptions = options || {};\n\t\tvar ast = this.ast(expressionString);\n\n\t\tif(!options.lookupRule) {\n\t\t\toptions.lookupRule = \"default\";\n\t\t}\n\t\tif(typeof options.lookupRule === \"string\") {\n\t\t\toptions.lookupRule = expression.lookupRules[options.lookupRule];\n\t\t}\n\t\tif(!options.methodRule) {\n\t\t\toptions.methodRule = \"default\";\n\t\t}\n\t\tif(typeof options.methodRule === \"string\") {\n\t\t\toptions.methodRule = expression.methodRules[options.methodRule];\n\t\t}\n\n\t\tvar expr = this.hydrateAst(ast, options, options.baseMethodType || \"Helper\");\n\n\t\treturn expr;\n\t},\n\thydrateAst: function(ast, options, methodType, isArg){\n\t\tvar hashes$$1;\n\t\tif(ast.type === \"Lookup\") {\n\t\t\tvar LookupRule = options.lookupRule(ast, methodType, isArg);\n\t\t\tvar lookup$$1 = new LookupRule(ast.key, ast.root && this.hydrateAst(ast.root, options, methodType), ast[sourceTextSymbol$2] );\n\t\t\treturn lookup$$1;\n\t\t}\n\t\telse if(ast.type === \"Literal\") {\n\t\t\treturn new literal(ast.value);\n\t\t}\n\t\telse if(ast.type === \"Arg\") {\n\t\t\treturn new arg(this.hydrateAst(ast.children[0], options, methodType, isArg),{compute: true});\n\t\t}\n\t\telse if(ast.type === \"Hash\") {\n\t\t\tthrow new Error(\"\");\n\t\t}\n\t\telse if(ast.type === \"Hashes\") {\n\t\t\thashes$$1 = {};\n\t\t\tast.children.forEach(function(hash){\n\t\t\t\thashes$$1[hash.prop] = this.hydrateAst( hash.children[0], options, methodType, true );\n\t\t\t}, this);\n\t\t\treturn new hashes(hashes$$1);\n\t\t}\n\t\telse if(ast.type === \"Call\" || ast.type === \"Helper\") {\n\t\t\t//get all arguments and hashes\n\t\t\thashes$$1 = {};\n\t\t\tvar args = [],\n\t\t\t\tchildren = ast.children,\n\t\t\t\tExpressionType = options.methodRule(ast);\n\t\t\tif(children) {\n\t\t\t\tfor(var i = 0 ; i 0)) {\n\t\t\t\t\tstack.addTo([\"Helper\", \"Call\", \"Bracket\"], {type: \"Literal\", value: utils$1.jsonParse( token )});\n\t\t\t\t} else if(firstParent.type === \"Bracket\" && (firstParent.children && firstParent.children.length > 0)) {\n\t\t\t\t\tstack.addTo([\"Helper\", \"Call\", \"Hash\"], {type: \"Literal\", value: utils$1.jsonParse( token )});\n\t\t\t\t} else {\n\t\t\t\t\tstack.addTo([\"Helper\", \"Call\", \"Hash\", \"Bracket\"], {type: \"Literal\", value: utils$1.jsonParse( token )});\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// Lookup\n\t\t\telse if(keyRegExp.test(token)) {\n\t\t\t\tlastToken = stack.topLastChild();\n\t\t\t\tfirstParent = stack.first([\"Helper\", \"Call\", \"Hash\", \"Bracket\"]);\n\n\t\t\t\t// if we had `foo().bar`, we need to change to a Lookup that looks up from lastToken.\n\t\t\t\tif(lastToken && (lastToken.type === \"Call\" || lastToken.type === \"Bracket\" ) && isAddingToExpression(token)) {\n\t\t\t\t\tstack.replaceTopLastChildAndPush({\n\t\t\t\t\t\ttype: \"Lookup\",\n\t\t\t\t\t\troot: lastToken,\n\t\t\t\t\t\tkey: token.slice(1) // remove leading `.`\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse if(firstParent.type === 'Bracket') {\n\t\t\t\t\t// a Bracket expression without children means we have\n\t\t\t\t\t// parsed `foo[` of an expression like `foo[bar]`\n\t\t\t\t\t// so we know to add the Lookup as a child of the Bracket expression\n\t\t\t\t\tif (!(firstParent.children && firstParent.children.length > 0)) {\n\t\t\t\t\t\tstack.addToAndPush([\"Bracket\"], {type: \"Lookup\", key: token});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// check if we are adding to a helper like `eq foo[bar] baz`\n\t\t\t\t\t\t// but not at the `.baz` of `eq foo[bar].baz xyz`\n\t\t\t\t\t\tif(stack.first([\"Helper\", \"Call\", \"Hash\", \"Arg\"]).type === 'Helper' && token[0] !== '.') {\n\t\t\t\t\t\t\tstack.addToAndPush([\"Helper\"], {type: \"Lookup\", key: token});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// otherwise, handle the `.baz` in expressions like `foo[bar].baz`\n\t\t\t\t\t\t\tstack.replaceTopAndPush({\n\t\t\t\t\t\t\t\ttype: \"Lookup\",\n\t\t\t\t\t\t\t\tkey: token.slice(1),\n\t\t\t\t\t\t\t\troot: firstParent\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// if two scopes, that means a helper\n\t\t\t\t\tconvertToHelperIfTopIsLookup(stack);\n\n\t\t\t\t\tstack.addToAndPush([\"Helper\", \"Call\", \"Hash\", \"Arg\", \"Bracket\"], {type: \"Lookup\", key: token});\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// Arg\n\t\t\telse if(token === \"~\") {\n\t\t\t\tconvertToHelperIfTopIsLookup(stack);\n\t\t\t\tstack.addToAndPush([\"Helper\", \"Call\", \"Hash\"], {type: \"Arg\", key: token});\n\t\t\t}\n\t\t\t// Call\n\t\t\t// foo[bar()]\n\t\t\telse if(token === \"(\") {\n\t\t\t\ttop = stack.top();\n\t\t\t\tlastToken = stack.topLastChild();\n\t\t\t\tif(top.type === \"Lookup\") {\n\t\t\t\t\tstack.replaceTopAndPush({\n\t\t\t\t\t\ttype: \"Call\",\n\t\t\t\t\t\tmethod: convertToAtLookup(top)\n\t\t\t\t\t});\n\n\t\t\t\t// Nested Call\n\t\t\t\t// foo()()\n\t\t\t\t} else if (lastToken && lastToken.type === \"Call\") {\n\t\t\t\t\tstack.replaceTopAndPush({\n\t\t\t\t\t\ttype: \"Call\",\n\t\t\t\t\t\tmethod: lastToken\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Unable to understand expression \"+tokens.join(''));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// End Call\n\t\t\telse if(token === \")\") {\n\t\t\t\tstack.popTo([\"Call\"]);\n\t\t\t}\n\t\t\t// End Call argument\n\t\t\telse if(token === \",\") {\n\t\t\t\t// The {{let foo=zed, bar=car}} helper is not in a call\n\t\t\t\t// expression.\n\t\t\t\tvar call = stack.first([\"Call\"]);\n\t\t\t\tif(call.type !== \"Call\") {\n\t\t\t\t\tstack.popUntil([\"Hash\"]);\n\t\t\t\t} else {\n\t\t\t\t\tstack.popUntil([\"Call\"]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// Bracket\n\t\t\telse if(token === \"[\") {\n\t\t\t\ttop = stack.top();\n\t\t\t\tlastToken = stack.topLastChild();\n\n\t\t\t\t// foo()[bar] => top -> root, lastToken -> {t: call, m: \"@foo\"}\n\t\t\t\t// foo()[bar()] => same as above last thing we see was a call expression \"rotate\"\n\t\t\t\t// test['foo'][0] => lastToken => {root: test, t: Bracket, c: 'foo' }\n\t\t\t\t// log(thing['prop'][0]) =>\n\t\t\t\t//\n\t\t\t\t// top -> {Call, children|args: [Bracket(Lookup(thing), c: ['[prop]'])]}\n\t\t\t\t// last-> Bracket(Lookup(thing), c: ['[prop]'])\n\t\t\t\tif (lastToken && (lastToken.type === \"Call\" || lastToken.type === \"Bracket\" ) ) {\n\t\t\t\t\t// must be on top of the stack as it recieves new stuff ...\n\t\t\t\t\t// however, what we really want is to\n\t\t\t\t\tstack.replaceTopLastChildAndPush({type: \"Bracket\", root: lastToken});\n\t\t\t\t} else if (top.type === \"Lookup\" || top.type === \"Bracket\") {\n\t\t\t\t\tvar bracket$$1 = {type: \"Bracket\", root: top};\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tcanReflect_1_19_2_canReflect.setKeyValue(bracket$$1, canSymbol_1_7_0_canSymbol.for(\"can-stache.originalKey\"), top.key);\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\tstack.replaceTopAndPush(bracket$$1);\n\t\t\t\t} else if (top.type === \"Call\") {\n\t\t\t\t\tstack.addToAndPush([\"Call\"], { type: \"Bracket\" });\n\t\t\t\t} else if (top === \" \") {\n\t\t\t\t\tstack.popUntil([\"Lookup\", \"Call\"]);\n\t\t\t\t\tconvertToHelperIfTopIsLookup(stack);\n\t\t\t\t\tstack.addToAndPush([\"Helper\", \"Call\", \"Hash\"], {type: \"Bracket\"});\n\t\t\t\t} else {\n\t\t\t\t\tstack.replaceTopAndPush({type: \"Bracket\"});\n\t\t\t\t}\n\t\t\t}\n\t\t\t// End Bracket\n\t\t\telse if(token === \"]\") {\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t\telse if(token === \" \") {\n\t\t\t\tstack.push(token);\n\t\t\t}\n\t\t}\n\t\treturn stack.root.children[0];\n\t}\n};\n\nvar expression_1 = expression;\n\n//\n// This provides helper utilities for Mustache processing. Currently,\n// only stache uses these helpers. Ideally, these utilities could be used\n// in other libraries implementing Mustache-like features.\n\n\n\n\n\n\nvar expression$1 = expression_1;\n\n\n\n\n\n\n\n\nvar toDOMSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.toDOM\");\n\n// Lazily lookup the context only if it's needed.\nfunction HelperOptions(scope, exprData, stringOnly) {\n\tthis.metadata = { rendered: false };\n\tthis.stringOnly = stringOnly;\n\tthis.scope = scope;\n\tthis.exprData = exprData;\n}\ncanDefineLazyValue_1_1_1_defineLazyValue(HelperOptions.prototype,\"context\", function(){\n\treturn this.scope.peek(\"this\");\n});\n\n\n\n\n// ## Helpers\n\nvar mustacheLineBreakRegExp = /(?:(^|\\r?\\n)(\\s*)(\\{\\{([\\s\\S]*)\\}\\}\\}?)([^\\S\\n\\r]*)($|\\r?\\n))|(\\{\\{([\\s\\S]*)\\}\\}\\}?)/g,\n\tmustacheWhitespaceRegExp = /\\s*\\{\\{--\\}\\}\\s*|\\s*(\\{\\{\\{?)-|-(\\}\\}\\}?)\\s*/g,\n\tk = function(){};\nvar viewInsertSymbol$1 = canSymbol_1_7_0_canSymbol.for(\"can.viewInsert\");\n\n\n// DOM, safeString or the insertSymbol can opt-out of updating as text\nfunction valueShouldBeInsertedAsHTML(value) {\n\treturn value !== null && typeof value === \"object\" && (\n\t\ttypeof value[toDOMSymbol$1] === \"function\" ||\n\t\ttypeof value[viewInsertSymbol$1] === \"function\" ||\n\t\ttypeof value.nodeType === \"number\" );\n}\n\n\n\n\nvar core = {\n\texpression: expression$1,\n\t// ## mustacheCore.makeEvaluator\n\t// Given a scope and expression, returns a function that evaluates that expression in the scope.\n\t//\n\t// This function first reads lookup values in the args and hash. Then it tries to figure out\n\t// if a helper is being called or a value is being read. Finally, depending on\n\t// if it's a helper, or not, and which mode the expression is in, it returns\n\t// a function that can quickly evaluate the expression.\n\t/**\n\t * @hide\n\t * Given a mode and expression data, returns a function that evaluates that expression.\n\t * @param {can-view-scope} The scope in which the expression is evaluated.\n\t * @param {can.view.Options} The option helpers in which the expression is evaluated.\n\t * @param {String} mode Either null, #, ^. > is handled elsewhere\n\t * @param {Object} exprData Data about what was in the mustache expression\n\t * @param {renderer} [truthyRenderer] Used to render a subsection\n\t * @param {renderer} [falseyRenderer] Used to render the inverse subsection\n\t * @param {String} [stringOnly] A flag to indicate that only strings will be returned by subsections.\n\t * @return {Function} An 'evaluator' function that evaluates the expression.\n\t */\n\tmakeEvaluator: function (scope, mode, exprData, truthyRenderer, falseyRenderer, stringOnly) {\n\n\t\tif(mode === \"^\") {\n\t\t\tvar temp = truthyRenderer;\n\t\t\ttruthyRenderer = falseyRenderer;\n\t\t\tfalseyRenderer = temp;\n\t\t}\n\n\t\tvar value,\n\t\t\thelperOptions = new HelperOptions(scope , exprData, stringOnly);\n\t\t\t// set up renderers\n\t\t\tutils$1.createRenderers(helperOptions, scope ,truthyRenderer, falseyRenderer, stringOnly);\n\n\t\tif(exprData instanceof expression$1.Call) {\n\t\t\tvalue = exprData.value(scope, helperOptions);\n\t\t} else if (exprData instanceof expression$1.Bracket) {\n\t\t\tvalue = exprData.value(scope);\n\t\t} else if (exprData instanceof expression$1.Lookup) {\n\t\t\tvalue = exprData.value(scope);\n\t\t} else if (exprData instanceof expression$1.Literal) {\n\t\t\tvalue = exprData.value.bind(exprData);\n\t\t} else if (exprData instanceof expression$1.Helper && exprData.methodExpr instanceof expression$1.Bracket) {\n\t\t\t// Brackets get wrapped in Helpers when used in attributes\n\t\t\t// like ``\n\t\t\tvalue = exprData.methodExpr.value(scope, helperOptions);\n\t\t} else {\n\t\t\tvalue = exprData.value(scope, helperOptions);\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\t// {{#something()}}foo{{/something}}\n\t\t// return evaluator for no mode or rendered value if a renderer was called\n\t\tif(!mode || helperOptions.metadata.rendered) {\n\t\t\treturn value;\n\t\t} else if( mode === \"#\" || mode === \"^\" ) {\n\n\t\t\treturn function(){\n\t\t\t\t// Get the value\n\t\t\t\tvar finalValue = canReflect_1_19_2_canReflect.getValue(value);\n\t\t\t\tvar result;\n\n\t\t\t\t// if options.fn or options.inverse was called, we take the observable's return value\n\t\t\t\t// as what should be put in the DOM.\n\t\t\t\tif(helperOptions.metadata.rendered) {\n\t\t\t\t\tresult = finalValue;\n\t\t\t\t}\n\t\t\t\t// If it's an array, render.\n\t\t\t\telse if ( typeof finalValue !== \"string\" && canReflect_1_19_2_canReflect.isListLike(finalValue) ) {\n\t\t\t\t\tvar isObserveList = canReflect_1_19_2_canReflect.isObservableLike(finalValue) &&\n\t\t\t\t\t\tcanReflect_1_19_2_canReflect.isListLike(finalValue);\n\n\t\t\t\t\tif(canReflect_1_19_2_canReflect.getKeyValue(finalValue, \"length\")) {\n\t\t\t\t\t\tif (stringOnly) {\n\t\t\t\t\t\t\tresult = utils$1.getItemsStringContent(finalValue, isObserveList, helperOptions);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult = canFragment_1_3_1_canFragment(utils$1.getItemsFragContent(finalValue, helperOptions, scope));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = helperOptions.inverse(scope);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult = finalValue ? helperOptions.fn(finalValue || scope) : helperOptions.inverse(scope);\n\t\t\t\t}\n\t\t\t\t// We always set the rendered result back to false.\n\t\t\t\t// - Future calls might change from returning a value to calling `.fn`\n\t\t\t\t// - We are calling `.fn` and `.inverse` ourselves.\n\t\t\t\thelperOptions.metadata.rendered = false;\n\t\t\t\treturn result;\n\t\t\t};\n\t\t} else {\n\t\t\t// not supported!\n\t\t}\n\t},\n\t// ## mustacheCore.makeLiveBindingPartialRenderer\n\t// Returns a renderer function that live binds a partial.\n\t/**\n\t * @hide\n\t * Returns a renderer function that live binds a partial.\n\t * @param {String} expressionString\n\t * @param {Object} state The html state of where the expression was found.\n\t * @return {function(this:HTMLElement,can-view-scope,can.view.Options)} A renderer function\n\t * live binds a partial.\n\t */\n\tmakeLiveBindingPartialRenderer: function(expressionString, state){\n\t\texpressionString = expressionString.trim();\n\t\tvar exprData,\n\t\t\t\tpartialName = expressionString.split(/\\s+/).shift();\n\n\t\tif(partialName !== expressionString) {\n\t\t\texprData = core.expression.parse(expressionString);\n\t\t}\n\n\t\treturn function(scope){\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tscope.set('scope.filename', state.filename);\n\t\t\t\tscope.set('scope.lineNumber', state.lineNo);\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\tvar partialFrag = new canObservation_4_2_0_canObservation(function(){\n\t\t\t\tvar localPartialName = partialName;\n\t\t\t\tvar partialScope = scope;\n\t\t\t\t// If the second parameter of a partial is a custom context\n\t\t\t\tif(exprData && exprData.argExprs.length === 1) {\n\t\t\t\t\tvar newContext = canReflect_1_19_2_canReflect.getValue( exprData.argExprs[0].value(scope) );\n\t\t\t\t\tif(typeof newContext === \"undefined\") {\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tdev.warn('The context ('+ exprData.argExprs[0].key +') you passed into the' +\n\t\t\t\t\t\t\t\t'partial ('+ partialName +') is not defined in the scope!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t}else{\n\t\t\t\t\t\tpartialScope = scope.add(newContext);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Look up partials in templateContext first\n\t\t\t\tvar partial = canReflect_1_19_2_canReflect.getKeyValue(partialScope.templateContext.partials, localPartialName);\n\t\t\t\tvar renderer;\n\n\t\t\t\tif (partial) {\n\t\t\t\t\trenderer = function() {\n\t\t\t\t\t\treturn partial.render ? partial.render(partialScope)\n\t\t\t\t\t\t\t: partial(partialScope);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t// Use can.view to get and render the partial.\n\t\t\t\telse {\n\t\t\t\t\tvar scopePartialName = partialScope.read(localPartialName, {\n\t\t\t\t\t\tisArgument: true\n\t\t\t\t\t}).value;\n\n\t\t\t\t\tif (scopePartialName === null || !scopePartialName && localPartialName[0] === '*') {\n\t\t\t\t\t\treturn canFragment_1_3_1_canFragment(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tif (scopePartialName) {\n\t\t\t\t\t\tlocalPartialName = scopePartialName;\n\t\t\t\t\t}\n\n\t\t\t\t\trenderer = function() {\n\t\t\t\t\t\tif(typeof localPartialName === \"function\"){\n\t\t\t\t\t\t\treturn localPartialName(partialScope, {});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar domRenderer = core.getTemplateById(localPartialName);\n\t\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\t\tif (!domRenderer) {\n\t\t\t\t\t\t\t\t\tdev.warn(\n\t\t\t\t\t\t\t\t\t\t(state.filename ? state.filename + ':' : '') +\n\t\t\t\t\t\t\t\t\t\t(state.lineNo ? state.lineNo + ': ' : '') +\n\t\t\t\t\t\t\t\t\t\t'Unable to find partial \"' + localPartialName + '\".');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\t\treturn domRenderer ? domRenderer(partialScope, {}) : document$1().createDocumentFragment();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tvar res = canObservationRecorder_1_3_1_canObservationRecorder.ignore(renderer)();\n\t\t\t\treturn canFragment_1_3_1_canFragment(res);\n\t\t\t});\n\n\t\t\tcanViewLive_5_0_5_canViewLive.html(this, partialFrag);\n\t\t};\n\t},\n\t// ## mustacheCore.makeStringBranchRenderer\n\t// Return a renderer function that evalutes to a string and caches\n\t// the evaluator on the scope.\n\t/**\n\t * @hide\n\t * Return a renderer function that evaluates to a string.\n\t * @param {String} mode\n\t * @param {can.stache.Expression} expression\n\t * @param {Object} state The html state of where the expression was found.\n\t * @return {function(can.view.Scope,can.view.Options, can-stache.view, can.view.renderer)}\n\t */\n\tmakeStringBranchRenderer: function(mode, expressionString, state){\n\t\tvar exprData = core.expression.parse(expressionString),\n\t\t\t// Use the full mustache expression as the cache key.\n\t\t\tfullExpression = mode+expressionString;\n\n\t\t// A branching renderer takes truthy and falsey renderer.\n\t\tvar branchRenderer = function branchRenderer(scope, truthyRenderer, falseyRenderer){\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tscope.set('scope.filename', state.filename);\n\t\t\t\tscope.set('scope.lineNumber', state.lineNo);\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\t// Check the scope's cache if the evaluator already exists for performance.\n\t\t\tvar evaluator = scope.__cache[fullExpression];\n\t\t\tif(mode || !evaluator) {\n\t\t\t\tevaluator = makeEvaluator( scope, mode, exprData, truthyRenderer, falseyRenderer, true);\n\t\t\t\tif(!mode) {\n\t\t\t\t\tscope.__cache[fullExpression] = evaluator;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar gotObservableValue = evaluator[canSymbol_1_7_0_canSymbol.for(\"can.onValue\")],\n\t\t\t\tres;\n\n\t\t\t// Run the evaluator and return the result.\n\t\t\tif(gotObservableValue) {\n\t\t\t\tres = canReflect_1_19_2_canReflect.getValue(evaluator);\n\t\t\t} else {\n\t\t\t\tres = evaluator();\n\t\t\t}\n\n\t\t\tif (res == null) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn res.nodeType === 11 ? res.textContent : \"\"+res;\n\t\t};\n\n\t\tbranchRenderer.exprData = exprData;\n\n\t\treturn branchRenderer;\n\t},\n\t// ## mustacheCore.makeLiveBindingBranchRenderer\n\t// Return a renderer function that evaluates the mustache expression and\n\t// sets up live binding if a compute with dependencies is found. Otherwise,\n\t// the element's value is set.\n\t//\n\t// This function works by creating a `can.compute` from the mustache expression.\n\t// If the compute has dependent observables, it passes the compute to `can.view.live`; otherwise,\n\t// it updates the element's property based on the compute's value.\n\t/**\n\t * @hide\n\t * Returns a renderer function that evaluates the mustache expression.\n\t * @param {String} mode\n\t * @param {can.stache.Expression} expression\n\t * @param {Object} state The html state of where the expression was found.\n\t */\n\tmakeLiveBindingBranchRenderer: function(mode, expressionString, state){\n\t\t// Pre-process the expression.\n\t\tvar exprData = core.expression.parse(expressionString);\n\n\t\t// A branching renderer takes truthy and falsey renderer.\n\t\tvar branchRenderer = function branchRenderer(scope, truthyRenderer, falseyRenderer){\n\t\t\t// If this is within a tag, make sure we only get string values.\n\t\t\tvar stringOnly = state.tag;\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tscope.set('scope.filename', state.filename);\n\t\t\t\tscope.set('scope.lineNumber', state.lineNo);\n\t\t\t}\n\t\t\t//!steal-remove-end\n\n\t\t\t// Get the evaluator. This does not need to be cached (probably) because if there\n\t\t\t// an observable value, it will be handled by `can.view.live`.\n\t\t\tvar evaluator = makeEvaluator( scope, mode, exprData, truthyRenderer, falseyRenderer, stringOnly );\n\n\t\t\t// Create a compute that can not be observed by other\n\t\t\t// computes. This is important because this renderer is likely called by\n\t\t\t// parent expressions. If this value changes, the parent expressions should\n\t\t\t// not re-evaluate. We prevent that by making sure this compute is ignored by\n\t\t\t// everyone else.\n\t\t\t//var compute = can.compute(evaluator, null, false);\n\t\t\tvar gotObservableValue = evaluator[canSymbol_1_7_0_canSymbol.for(\"can.onValue\")];\n\t\t\tvar observable;\n\t\t\tif(gotObservableValue) {\n\t\t\t\tobservable = evaluator;\n\t\t\t} else {\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tObject.defineProperty(evaluator,\"name\",{\n\t\t\t\t\t\tvalue: \"{{\"+(mode || \"\")+expressionString+\"}}\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\t\t\t\tobservable = new canObservation_4_2_0_canObservation(evaluator,null,{isObservable: false});\n\t\t\t}\n\n\t\t\t// Bind on the computeValue to set the cached value. This helps performance\n\t\t\t// so live binding can read a cached value instead of re-calculating.\n\t\t\tcanReflect_1_19_2_canReflect.onValue(observable, k);\n\n\t\t\tvar value = canReflect_1_19_2_canReflect.getValue(observable);\n\n\t\t\t// If value is a function and not a Lookup ({{foo}}),\n\t\t\t// it's a helper that returned a function and should be called.\n\t\t\tif(typeof value === \"function\" && !(exprData instanceof expression$1.Lookup)) {\n\n\t\t\t\t// A helper function should do it's own binding. Similar to how\n\t\t\t\t// we prevented this function's compute from being noticed by parent expressions,\n\t\t\t\t// we hide any observables read in the function by saving any observables that\n\t\t\t\t// have been read and then setting them back which overwrites any `can.__observe` calls\n\t\t\t\t// performed in value.\n\t\t\t\tcanObservationRecorder_1_3_1_canObservationRecorder.ignore(value)(this);\n\n\t\t\t}\n\t\t\t// If the computeValue has observable dependencies, setup live binding.\n\t\t\telse if( canReflect_1_19_2_canReflect.valueHasDependencies(observable) ) {\n\t\t\t\t// Depending on where the template is, setup live-binding differently.\n\t\t\t\tif(state.attr) {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attr(this, state.attr, observable);\n\t\t\t\t}\n\t\t\t\telse if( state.tag ) {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attrs( this, observable );\n\t\t\t\t}\n\t\t\t\telse if(state.text && !valueShouldBeInsertedAsHTML(value)) {\n\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tif(value !== null && typeof value === \"object\") {\n\t\t\t\t\t\t\tdev.warn(\"Previously, the result of \"+\n\t\t\t\t\t\t\t\texpressionString+\" in \"+state.filename+\":\"+state.lineNo+\n\t\t\t\t\t\t\t\t\", was being inserted as HTML instead of TEXT. Please use stache.safeString(obj) \"+\n\t\t\t\t\t\t\t\t\"if you would like the object to be treated as HTML.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.text(this, observable);\n\t\t\t\t} else {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.html(this, observable);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the computeValue has no observable dependencies, just set the value on the element.\n\t\t\telse {\n\n\t\t\t\tif(state.attr) {\n\t\t\t\t\tcanDomMutate_2_0_9_canDomMutate.setAttribute(this, state.attr, value);\n\t\t\t\t}\n\t\t\t\telse if(state.tag) {\n\t\t\t\t\tcanViewLive_5_0_5_canViewLive.attrs(this, value);\n\t\t\t\t}\n\t\t\t\telse if(state.text && !valueShouldBeInsertedAsHTML(value)) {\n\t\t\t\t\tthis.nodeValue = helpers$2.makeString(value);\n\t\t\t\t}\n\t\t\t\telse if( value != null ){\n\t\t\t\t\tif (typeof value[viewInsertSymbol$1] === \"function\") {\n\t\t\t\t\t\tvar insert = value[viewInsertSymbol$1]({});\n\t\t\t\t\t\tthis.parentNode.replaceChild( insert, this );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.parentNode.replaceChild(canFragment_1_3_1_canFragment(value, this.ownerDocument), this);\n\t\t\t\t\t\t//domMutateNode.replaceChild.call(this.parentNode, frag(value, this.ownerDocument), this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Unbind the compute.\n\t\t\tcanReflect_1_19_2_canReflect.offValue(observable, k);\n\t\t};\n\n\t\tbranchRenderer.exprData = exprData;\n\n\t\treturn branchRenderer;\n\t},\n\t// ## mustacheCore.splitModeFromExpression\n\t// Returns the mustache mode split from the rest of the expression.\n\t/**\n\t * @hide\n\t * Returns the mustache mode split from the rest of the expression.\n\t * @param {can.stache.Expression} expression\n\t * @param {Object} state The state of HTML where the expression was found.\n\t */\n\tsplitModeFromExpression: function(expression, state){\n\t\texpression = expression.trim();\n\t\tvar mode = expression.charAt(0);\n\n\t\tif( \"#/{&^>!<\".indexOf(mode) >= 0 ) {\n\t\t\texpression = expression.substr(1).trim();\n\t\t} else {\n\t\t\tmode = null;\n\t\t}\n\t\t// Triple braces do nothing within a tag.\n\t\tif(mode === \"{\" && state.node) {\n\t\t\tmode = null;\n\t\t}\n\t\treturn {\n\t\t\tmode: mode,\n\t\t\texpression: expression\n\t\t};\n\t},\n\t// ## mustacheCore.cleanLineEndings\n\t// Removes line breaks accoding to the mustache specification.\n\t/**\n\t * @hide\n\t * Prunes line breaks accoding to the mustache specification.\n\t * @param {String} template\n\t * @return {String}\n\t */\n\tcleanLineEndings: function(template){\n\n\t\t// Finds mustache tags with space around them or no space around them.\n\t\treturn template.replace( mustacheLineBreakRegExp,\n\t\t\tfunction(whole,\n\t\t\t\treturnBefore,\n\t\t\t\tspaceBefore,\n\t\t\t\tspecial,\n\t\t\t\texpression,\n\t\t\t\tspaceAfter,\n\t\t\t\treturnAfter,\n\t\t\t\t// A mustache magic tag that has no space around it.\n\t\t\t\tspaceLessSpecial,\n\t\t\t\tspaceLessExpression,\n\t\t\t\tmatchIndex){\n\n\t\t\t// IE 8 will provide undefined\n\t\t\tspaceAfter = (spaceAfter || \"\");\n\t\t\treturnBefore = (returnBefore || \"\");\n\t\t\tspaceBefore = (spaceBefore || \"\");\n\n\t\t\tvar modeAndExpression = splitModeFromExpression(expression || spaceLessExpression,{});\n\n\t\t\t// If it's a partial or tripple stache, leave in place.\n\t\t\tif(spaceLessSpecial || \">{\".indexOf( modeAndExpression.mode) >= 0) {\n\t\t\t\treturn whole;\n\t\t\t} else if( \"^#!/\".indexOf( modeAndExpression.mode ) >= 0 ) {\n\t\t\t\t// Return the magic tag and a trailing linebreak if this did not\n\t\t\t\t// start a new line and there was an end line.\n\t\t\t\t// Add a normalized leading space, if there was any leading space, in case this abuts a tag name\n\t\t\t\tspaceBefore = (returnBefore + spaceBefore) && \" \";\n\t\t\t\treturn spaceBefore+special+( matchIndex !== 0 && returnAfter.length ? returnBefore+\"\\n\" :\"\");\n\n\n\t\t\t} else {\n\t\t\t\t// There is no mode, return special with spaces around it.\n\t\t\t\treturn spaceBefore+special+spaceAfter+(spaceBefore.length || matchIndex !== 0 ? returnBefore+\"\\n\" : \"\");\n\t\t\t}\n\n\t\t});\n\t},\n\t// ## mustacheCore.cleanWhitespaceControl\n\t// Removes whitespace according to the whitespace control.\n\t/**\n\t * @hide\n\t * Prunes whitespace according to the whitespace control.\n\t * @param {String} template\n\t * @return {String}\n\t */\n\tcleanWhitespaceControl: function(template) {\n\t\treturn template.replace(mustacheWhitespaceRegExp, \"$1$2\");\n\t},\n\tgetTemplateById: function(){}\n};\n\n// ## Local Variable Cache\n//\n// The following creates slightly more quickly accessible references of the following\n// core functions.\nvar makeEvaluator = core.makeEvaluator,\n\tsplitModeFromExpression = core.splitModeFromExpression;\n\nvar mustache_core = core;\n\n/**\n * @module {function} can-globals/base-url/base-url base-url\n * @parent can-globals/modules\n *\n * @signature `baseUrl(optionalBaseUrlToSet)`\n *\n * Get and/or set the \"base\" (containing path) of the document.\n *\n * ```js\n * var baseUrl = require(\"can-globals/base-url/base-url\");\n *\n * console.log(baseUrl()); // -> \"http://localhost:8080\"\n * console.log(baseUrl(baseUrl() + \"/foo/bar\")); // -> \"http://localhost:8080/foo/bar\"\n * console.log(baseUrl()); // -> \"http://localhost:8080/foo/bar\"\n * ```\n *\n * @param {String} setUrl An optional base url to override reading the base URL from the known path.\n *\n * @return {String} Returns the set or computed base URL\n */\n\ncanGlobals_1_2_2_canGlobalsInstance.define('base-url', function(){\n\tvar global = canGlobals_1_2_2_canGlobalsInstance.getKeyValue('global');\n\tvar domDocument = canGlobals_1_2_2_canGlobalsInstance.getKeyValue('document');\n\tif (domDocument && 'baseURI' in domDocument) {\n\t\treturn domDocument.baseURI;\n\t} else if(global.location) {\n\t\tvar href = global.location.href;\n\t\tvar lastSlash = href.lastIndexOf(\"/\");\n\t\treturn lastSlash !== -1 ? href.substr(0, lastSlash) : href;\n\t} else if(typeof process !== \"undefined\") {\n\t\treturn process.cwd();\n\t}\n});\n\nvar baseUrl = canGlobals_1_2_2_canGlobalsInstance.makeExport('base-url');\n\n/**\n * @module {function} can-parse-uri can-parse-uri\n * @parent can-js-utilities\n * @collection can-infrastructure\n * @package ./package.json\n * @signature `parseURI(url)`\n *\n * Parse a URI into its components.\n *\n * ```js\n * import {parseURI} from \"can\"\n * parseURI(\"http://foo:8080/bar.html?query#change\")\n * //-> {\n * // authority: \"//foo:8080\",\n * // hash: \"#change\",\n * // host: \"foo:8080\",\n * // hostname: \"foo\",\n * // href: \"http://foo:8080/bar.html?query#change\",\n * // pathname: \"/bar.html\",\n * // port: \"8080\",\n * // protocol: \"http:\",\n * // search: \"?query\"\n * // }\n * ```\n *\n * @param {String} url The URL you want to parse.\n *\n * @return {Object} Returns an object with properties for each part of the URL. `null`\n * is returned if the url can not be parsed.\n */\n\nvar canParseUri_1_2_2_canParseUri = canNamespace_1_0_0_canNamespace.parseURI = function(url){\n\t\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t\t\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\t\treturn (m ? {\n\t\t\thref : m[0] || '',\n\t\t\tprotocol : m[1] || '',\n\t\t\tauthority: m[2] || '',\n\t\t\thost : m[3] || '',\n\t\t\thostname : m[4] || '',\n\t\t\tport : m[5] || '',\n\t\t\tpathname : m[6] || '',\n\t\t\tsearch : m[7] || '',\n\t\t\thash : m[8] || ''\n\t\t} : null);\n\t};\n\nvar canJoinUris_1_2_0_canJoinUris = canNamespace_1_0_0_canNamespace.joinURIs = function(base, href) {\n\tfunction removeDotSegments(input) {\n\t\tvar output = [];\n\t\tinput.replace(/^(\\.\\.?(\\/|$))+/, '')\n\t\t\t.replace(/\\/(\\.(\\/|$))+/g, '/')\n\t\t\t.replace(/\\/\\.\\.$/, '/../')\n\t\t\t.replace(/\\/?[^\\/]*/g, function (p) {\n\t\t\t\tif (p === '/..') {\n\t\t\t\t\toutput.pop();\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(p);\n\t\t\t\t}\n\t\t\t});\n\t\treturn output.join('').replace(/^\\//, input.charAt(0) === '/' ? '/' : '');\n\t}\n\n\thref = canParseUri_1_2_2_canParseUri(href || '');\n\tbase = canParseUri_1_2_2_canParseUri(base || '');\n\n\treturn !href || !base ? null : (href.protocol || base.protocol) +\n\t\t(href.protocol || href.authority ? href.authority : base.authority) +\n\t\tremoveDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : (href.pathname ? ((base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname) : base.pathname)) +\n\t\t\t(href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) +\n\t\t\thref.hash;\n};\n\nfunction noop$1 () {}\nvar resolveValue = noop$1;\nvar evaluateArgs = noop$1;\nvar __testing = {};\n\n//!steal-remove-start\nif (process.env.NODE_ENV !== 'production') {\n\tvar canReflect = canReflect_1_19_2_canReflect;\n\n\tvar canSymbol$1 = canSymbol_1_7_0_canSymbol;\n\n\t__testing = {\n\t\tallowDebugger: true\n\t};\n\n\tresolveValue = function (value) {\n\t\tif (value && value[canSymbol$1.for(\"can.getValue\")]) {\n\t\t\treturn canReflect.getValue(value);\n\t\t}\n\t\treturn value;\n\t};\n\n\tevaluateArgs = function (left, right) {\n\t\tswitch (arguments.length) {\n\t\t\tcase 0: return true;\n\t\t\tcase 1: return !!resolveValue(left);\n\t\t\tcase 2: return resolveValue(left) === resolveValue(right);\n\t\t\tdefault:\n\t\t\t\tcanLog_1_0_2_canLog.log([\n\t\t\t\t\t'Usage:',\n\t\t\t\t\t' {{debugger}}: break any time this helper is evaluated',\n\t\t\t\t\t' {{debugger condition}}: break when `condition` is truthy',\n\t\t\t\t\t' {{debugger left right}}: break when `left` === `right`'\n\t\t\t\t].join('\\n'));\n\t\t\t\tthrow new Error('{{debugger}} must have less than three arguments');\n\t\t}\n\t};\n}\n//!steal-remove-end\n\nfunction debuggerHelper (left, right) {\n\t//!steal-remove-start\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tvar shouldBreak = evaluateArgs.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n\t\tif (!shouldBreak) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar options = arguments[arguments.length - 1],\n\t\t\tscope = options && options.scope;\n\t\tvar get = function (path) {\n\t\t\treturn scope.get(path);\n\t\t};\n\t\t// This makes sure `get`, `options` and `scope` are available\n\t\tdebuggerHelper._lastGet = get;\n\n\t\tcanLog_1_0_2_canLog.log('Use `get()` to debug this template');\n\n\t\tvar allowDebugger = __testing.allowDebugger;\n\t\t// forgotten debugger\n\t\t// jshint -W087\n\t\tif (allowDebugger) {\n\t\t\tdebugger;\n\t\t\treturn;\n\t\t}\n\t\t// jshint +W087\n\t}\n\t//!steal-remove-end\n\n\tcanLog_1_0_2_canLog.warn('Forgotten {{debugger}} helper');\n}\ndebuggerHelper.requiresOptionsArgument = true;\n\nvar Debugger = {\n\thelper: debuggerHelper,\n\tevaluateArgs: evaluateArgs,\n\tresolveValue: resolveValue,\n\n\t// used only for testing purposes\n\t__testing: __testing\n};\n\nvar truthyObservable = function(observable){\n return new canObservation_4_2_0_canObservation(function truthyObservation(){\n var val = canReflect_1_19_2_canReflect.getValue(observable);\n\n return !!val;\n });\n};\n\nfunction makeConverter(getterSetter){\n\tgetterSetter = getterSetter || {};\n\treturn function(newVal, source) {\n\t\tvar args = canReflect_1_19_2_canReflect.toArray(arguments);\n\t\tif(newVal instanceof setIdentifier) {\n\t\t\treturn typeof getterSetter.set === \"function\" ?\n\t\t\t\tgetterSetter.set.apply(this, [newVal.value].concat(args.slice(1))) :\n\t\t\t\tsource(newVal.value);\n\t\t} else {\n\t\t\treturn typeof getterSetter.get === \"function\" ?\n\t\t\t\tgetterSetter.get.apply(this, args) :\n\t\t\t\targs[0];\n\t\t}\n\t};\n}\n\nvar converter = makeConverter;\n\nvar bindAndRead = function (value) {\n\tif ( value && canReflect_1_19_2_canReflect.isValueLike(value) ) {\n\t\tcanObservation_4_2_0_canObservation.temporarilyBind(value);\n\t\treturn canReflect_1_19_2_canReflect.getValue(value);\n\t} else {\n\t\treturn value;\n\t}\n};\n\nfunction forOfInteger(integer, variableName, options) {\n\tvar result = [];\n\tfor (var i = 0; i < integer; i++) {\n\t\tvar variableScope = {};\n\t\tif(variableName !== undefined){\n\t\t\tvariableScope[variableName] = i;\n\t\t}\n\t\tresult.push(\n\t\t\toptions.fn( options.scope\n\t\t\t\t.add({ index: i }, { special: true })\n\t\t\t\t.addLetContext(variableScope) )\n\t\t);\n\t}\n\n\treturn options.stringOnly ? result.join('') : result;\n}\n\nfunction forOfObject(object, variableName, options){\n\tvar result = [];\n\tcanReflect_1_19_2_canReflect.each(object, function(val, key){\n\t\t// Allow key to contain a dot, for example: \"My.key.has.dot\"\n\t\tvar value = new keyObservable(object, key.replace(/\\./g, \"\\\\.\"));\n\t\tvar variableScope = {};\n\t\tif(variableName !== undefined){\n\t\t\tvariableScope[variableName] = value;\n\t\t}\n\t\tresult.push(\n\t\t\toptions.fn( options.scope\n\t\t\t\t.add({ key: key }, { special: true })\n\t\t\t\t.addLetContext(variableScope) )\n\t\t);\n\t});\n\n\treturn options.stringOnly ? result.join('') : result;\n}\n\n// this is called with the ast ... we are going to use that to our advantage.\nvar forHelper = function(helperOptions) {\n\t// lookup\n\n\t// TODO: remove in prod\n\t// make sure we got called with the right stuff\n\tif(helperOptions.exprData.argExprs.length !== 1) {\n\t\tthrow new Error(\"for(of) broken syntax\");\n\t}\n\n\t// TODO: check if an instance of helper;\n\n\tvar helperExpr = helperOptions.exprData.argExprs[0].expr;\n\tvar variableName, valueLookup, valueObservable;\n\tif(helperExpr instanceof expression_1.Lookup) {\n\n\t\tvalueObservable = helperExpr.value(helperOptions.scope);\n\n\t} else if(helperExpr instanceof expression_1.Helper) {\n\t\t// TODO: remove in prod\n\t\tvar inLookup = helperExpr.argExprs[0];\n\t\tif(inLookup.key !== \"of\") {\n\t\t\tthrow new Error(\"for(of) broken syntax\");\n\t\t}\n\t\tvariableName = helperExpr.methodExpr.key;\n\t\tvalueLookup = helperExpr.argExprs[1];\n\t\tvalueObservable = valueLookup.value(helperOptions.scope);\n\t}\n\n\tvar items = valueObservable;\n\n\tvar args = [].slice.call(arguments),\n\t\toptions = args.pop(),\n\t\tresolved = bindAndRead(items);\n\n\tif(resolved && resolved === Math.floor(resolved)) {\n\t\treturn forOfInteger(resolved, variableName, helperOptions);\n\t}\n\tif(resolved && !canReflect_1_19_2_canReflect.isListLike(resolved)) {\n\t\treturn forOfObject(resolved,variableName, helperOptions);\n\t}\n\tif(options.stringOnly) {\n\t\tvar parts = [];\n\t\tcanReflect_1_19_2_canReflect.eachIndex(resolved, function(value, index){\n\t\t\tvar variableScope = {};\n\t\t\tif(variableName !== undefined){\n\t\t\t\tvariableScope[variableName] = value;\n\t\t\t}\n\t\t\tparts.push(\n\t\t\t\thelperOptions.fn( options.scope\n\t\t\t\t\t.add({ index: index }, { special: true })\n\t\t\t\t\t.addLetContext(variableScope) )\n\t\t\t);\n\t\t});\n\t\treturn parts.join(\"\");\n\t} else {\n\t\t// Tells that a helper has been called, this function should be returned through\n\t\t// checking its value.\n\t\toptions.metadata.rendered = true;\n\t\treturn function(el){\n\n\t\t\tvar cb = function (item, index) {\n\t\t\t\tvar variableScope = {};\n\t\t\t\tif(variableName !== undefined){\n\t\t\t\t\tvariableScope[variableName] = item;\n\t\t\t\t}\n\t\t\t\treturn options.fn(\n\t\t\t\t\toptions.scope\n\t\t\t\t\t.add({ index: index }, { special: true })\n\t\t\t\t\t.addLetContext(variableScope),\n\t\t\t\t\toptions.options\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tcanViewLive_5_0_5_canViewLive.list(el, items, cb, options.context, function(list){\n\t\t\t\treturn options.inverse(options.scope, options.options);\n\t\t\t});\n\t\t};\n\t}\n};\nforHelper.isLiveBound = true;\nforHelper.requiresOptionsArgument = true;\nforHelper.ignoreArgLookup = function ignoreArgLookup(index) {\n\treturn index === 0;\n};\n\nvar ForOf = forHelper;\n\nfunction isVariable(scope) {\n\treturn scope._meta.variable === true;\n}\n\n// This sets variables so it needs to not causes changes.\nvar letHelper = canObservationRecorder_1_3_1_canObservationRecorder.ignore(function(options){\n\tif(options.isSection){\n\t\treturn options.fn( options.scope.addLetContext( options.hash ) );\n\t}\n\tvar variableScope = options.scope.getScope(isVariable);\n\tif(!variableScope) {\n\t\tthrow new Error(\"There is no variable scope!\");\n\t}\n\n\tcanReflect_1_19_2_canReflect.assignMap(variableScope._context, options.hash);\n\treturn document.createTextNode(\"\");\n});\n\nvar Let = letHelper;\n\nvar keepNodeSymbol = canSymbol_1_7_0_canSymbol.for(\"done.keepNode\");\n\nfunction portalHelper(elementObservable, options){\n\tvar debugName = \"portal(\" + canReflect_1_19_2_canReflect.getName(elementObservable) + \")\";\n\n\tfunction portalContents() {\n\t\tvar frag = options.fn(\n\t\t\toptions.scope\n\t\t\t.addLetContext({}),\n\t\t\toptions.options\n\t\t);\n\n\t\tvar child = frag.firstChild;\n\t\twhile(child) {\n\t\t\t// makes sure DoneJS does not remove these nodes\n\t\t\tchild[keepNodeSymbol] = true;\n\t\t\tchild = child.nextSibling;\n\t\t}\n\n\n\t\treturn frag;\n\t}\n\n\t//!steal-remove-start\n\tif(process.env.NODE_ENV !== 'production') {\n\t\tObject.defineProperty(portalContents,\"name\",{\n\t\t\tvalue: debugName+\" contents\"\n\t\t});\n\t}\n\t//!steal-remove-end\n\n\n\t// Where we are portalling\n\tvar portalElement,\n\t\tstartPortalledPlaceholder,\n\t\tendPortalledPlaceholder,\n\t\tcommentPlaceholderDispose;\n\tfunction teardownPortalledContent() {\n\n\t\tif(portalElement) {\n\t\t\tcanReflect_1_19_2_canReflect.offValue(elementObservable, getElementAndRender);\n\t\t\tportalElement = null;\n\t\t}\n\n\t\tif(startPortalledPlaceholder && endPortalledPlaceholder) {\n\t\t\tvar parentNode = startPortalledPlaceholder.parentNode;\n\t\t\tif(parentNode) {\n\t\t\t\thelpers$2.range.remove({start: startPortalledPlaceholder, end: endPortalledPlaceholder});\n\t\t\t\tcanDomMutate_2_0_9_node.removeChild.call(parentNode, startPortalledPlaceholder );\n\t\t\t\tcanDomMutate_2_0_9_node.removeChild.call(parentNode, endPortalledPlaceholder );\n\t\t\t\tstartPortalledPlaceholder = endPortalledPlaceholder = null;\n\t\t\t}\n\t\t}\n\t}\n\tfunction teardownEverything(){\n\t\tif(commentPlaceholderDispose) {\n\t\t\tcommentPlaceholderDispose();\n\t\t}\n\t\tteardownPortalledContent();\n\t}\n\t// The element has changed\n\tfunction getElementAndRender() {\n\t\t// remove the old rendered content and unbind if we've bound before\n\t\tteardownPortalledContent();\n\n\t\tcanReflect_1_19_2_canReflect.onValue(elementObservable, getElementAndRender);\n\n\t\tportalElement = canReflect_1_19_2_canReflect.getValue(elementObservable);\n\n\t\tif(portalElement) {\n\t\t\tstartPortalledPlaceholder = portalElement.ownerDocument.createComment(debugName+\" contents\");\n\t\t\tendPortalledPlaceholder = portalElement.ownerDocument.createComment(\"can-end-placeholder\");\n\t\t\tstartPortalledPlaceholder[keepNodeSymbol] = true;\n\t\t\tendPortalledPlaceholder[keepNodeSymbol] = true;\n\t\t\tportalElement.appendChild(startPortalledPlaceholder);\n\t\t\tportalElement.appendChild(endPortalledPlaceholder);\n\n\t\t\tvar observable = new canObservation_4_2_0_canObservation(portalContents, null, {isObservable: false});\n\n\t\t\tcanViewLive_5_0_5_canViewLive.html(startPortalledPlaceholder, observable);\n\t\t} else {\n\t\t\toptions.metadata.rendered = true;\n\t\t}\n\n\t}\n\n\tgetElementAndRender();\n\n\treturn function(placeholderElement) {\n\t\tvar commentPlaceholder = placeholderElement.ownerDocument.createComment(debugName);\n\n\t\tplaceholderElement.parentNode.replaceChild(commentPlaceholder, placeholderElement);\n\t\tcommentPlaceholderDispose = canDomMutate_2_0_9_canDomMutate.onNodeRemoved(commentPlaceholder, teardownEverything);\n\t\treturn commentPlaceholder;\n\t};\n}\n\nportalHelper.isLiveBound = true;\nportalHelper.requiresOptionsArgument = true;\n\nvar Portal = portalHelper;\n\nvar debuggerHelper$1 = Debugger.helper;\n\n\n\n\n\n\n\n\n\n\n\n\nvar builtInHelpers = {};\nvar builtInConverters = {};\nvar converterPackages = new WeakMap();\n\n// ## Helpers\nvar helpersCore = {\n\tlooksLikeOptions: function(options){\n\t\treturn options && typeof options.fn === \"function\" && typeof options.inverse === \"function\";\n\t},\n\tresolve: function(value) {\n\t\tif (value && canReflect_1_19_2_canReflect.isValueLike(value)) {\n\t\t\treturn canReflect_1_19_2_canReflect.getValue(value);\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t},\n\tresolveHash: function(hash){\n\t\tvar params = {};\n\t\tfor(var prop in hash) {\n\t\t\tparams[prop] = helpersCore.resolve(hash[prop]);\n\t\t}\n\t\treturn params;\n\t},\n\tbindAndRead: function (value) {\n\t\tif ( value && canReflect_1_19_2_canReflect.isValueLike(value) ) {\n\t\t\tcanObservation_4_2_0_canObservation.temporarilyBind(value);\n\t\t\treturn canReflect_1_19_2_canReflect.getValue(value);\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t},\n\tregisterHelper: function(name, callback){\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tif (canStacheHelpers_1_2_0_canStacheHelpers[name]) {\n\t\t\t\tdev.warn('The helper ' + name + ' has already been registered.');\n\t\t\t}\n\t\t}\n\t\t//!steal-remove-end\n\n\t\t// mark passed in helper so it will be automatically passed\n\t\t// helperOptions (.fn, .inverse, etc) when called as Call Expressions\n\t\tcallback.requiresOptionsArgument = true;\n\n\t\t// store on global helpers list\n\t\tcanStacheHelpers_1_2_0_canStacheHelpers[name] = callback;\n\t},\n\tregisterHelpers: function(helpers) {\n\t\tvar name, callback;\n\t\tfor(name in helpers) {\n\t\t\tcallback = helpers[name];\n\t\t\thelpersCore.registerHelper(name, helpersCore.makeSimpleHelper(callback));\n\t\t}\n\t},\n\tregisterConverter: function(name, getterSetter) {\n\t\thelpersCore.registerHelper(name, converter(getterSetter));\n\t},\n\tmakeSimpleHelper: function(fn) {\n\t\treturn function() {\n\t\t\tvar realArgs = [];\n\t\t\tcanReflect_1_19_2_canReflect.eachIndex(arguments, function(val) {\n\t\t\t\trealArgs.push(helpersCore.resolve(val));\n\t\t\t});\n\t\t\treturn fn.apply(this, realArgs);\n\t\t};\n\t},\n\taddHelper: function(name, callback) {\n\t\tif(typeof name === \"object\") {\n\t\t\treturn helpersCore.registerHelpers(name);\n\t\t}\n\t\treturn helpersCore.registerHelper(name, helpersCore.makeSimpleHelper(callback));\n\t},\n\taddConverter: function(name, getterSetter) {\n\t\tif(typeof name === \"object\") {\n\t\t\tif(!converterPackages.has(name)) {\n\t\t\t\tconverterPackages.set(name, true);\n\t\t\t\tcanReflect_1_19_2_canReflect.eachKey(name, function(getterSetter, name) {\n\t\t\t\t\thelpersCore.addConverter(name, getterSetter);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tvar helper = converter(getterSetter);\n\t\thelper.isLiveBound = true;\n\t\thelpersCore.registerHelper(name, helper);\n\t},\n\n\t// add helpers that set up their own internal live-binding\n\t// these helpers will not be wrapped in computes and will\n\t// receive observable arguments when called with Call Expressions\n\taddLiveHelper: function(name, callback) {\n\t\tcallback.isLiveBound = true;\n\t\treturn helpersCore.registerHelper(name, callback);\n\t},\n\n\tgetHelper: function(name, scope) {\n\t\tvar helper = scope && scope.getHelper(name);\n\n\t\tif (!helper) {\n\t\t\thelper = canStacheHelpers_1_2_0_canStacheHelpers[name];\n\t\t}\n\n\t\treturn helper;\n\t},\n\t__resetHelpers: function() {\n\t\t// remove all helpers from can-stache-helpers object\n\t\tfor (var helper in canStacheHelpers_1_2_0_canStacheHelpers) {\n\t\t\tdelete canStacheHelpers_1_2_0_canStacheHelpers[helper];\n\t\t}\n\t\t// Clear converterPackages map before re-adding converters\n\t\tconverterPackages.delete(builtInConverters);\n\n\t\thelpersCore.addBuiltInHelpers();\n\t\thelpersCore.addBuiltInConverters();\n\t},\n\taddBuiltInHelpers: function() {\n\t\tcanReflect_1_19_2_canReflect.each(builtInHelpers, function(helper, helperName) {\n\t\t\tcanStacheHelpers_1_2_0_canStacheHelpers[helperName] = helper;\n\t\t});\n\t},\n\taddBuiltInConverters: function () {\n\t\thelpersCore.addConverter(builtInConverters);\n\t},\n\t_makeLogicHelper: function(name, logic){\n\t\tvar logicHelper = canAssign_1_3_3_canAssign(function() {\n\t\t\tvar args = Array.prototype.slice.call(arguments, 0),\n\t\t\t\toptions;\n\n\t\t\tif( helpersCore.looksLikeOptions(args[args.length - 1]) ){\n\t\t\t\toptions = args.pop();\n\t\t\t}\n\n\t\t\tfunction callLogic(){\n\t\t\t\t// if there are options, we want to prevent re-rendering if values are still truthy\n\t\t\t\tif(options) {\n\t\t\t\t\treturn logic(args) ? true: false;\n\t\t\t\t} else {\n\t\t\t\t\treturn logic(args);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//!steal-remove-start\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tObject.defineProperty(callLogic, \"name\", {\n\t\t\t\t\tvalue: name+\"(\"+args.map(function(arg){\n\t\t\t\t\t\treturn canReflect_1_19_2_canReflect.getName(arg);\n\t\t\t\t\t}).join(\",\")+\")\",\n\t\t\t\t\tconfigurable: true\n\t\t\t\t});\n\t\t\t}\n\t\t\t//!steal-remove-end\n\t\t\tvar callFn = new canObservation_4_2_0_canObservation(callLogic);\n\n\t\t\tif(options) {\n\t\t\t\treturn callFn.get() ? options.fn() : options.inverse();\n\t\t\t} else {\n\t\t\t\treturn callFn.get();\n\t\t\t}\n\n\t\t},{requiresOptionsArgument: true, isLiveBound: true});\n\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tObject.defineProperty(logicHelper, \"name\", {\n\t\t\t\tvalue: name,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t\t//!steal-remove-end\n\n\t\treturn logicHelper;\n\t}\n};\n\n\n\n// ## IF HELPER\nvar ifHelper = canAssign_1_3_3_canAssign(function ifHelper(expr, options) {\n\tvar value;\n\t// if it's a function, wrap its value in a compute\n\t// that will only change values from true to false\n\tif (expr && canReflect_1_19_2_canReflect.isValueLike(expr)) {\n\t\tvalue = canReflect_1_19_2_canReflect.getValue(new truthyObservable(expr));\n\t} else {\n\t\tvalue = !! helpersCore.resolve(expr);\n\t}\n\n\tif (options) {\n\t\treturn value ? options.fn(options.scope || this) : options.inverse(options.scope || this);\n\t}\n\n\treturn !!value;\n}, {requiresOptionsArgument: true, isLiveBound: true});\n\n\n\n\n//## EQ/IS HELPER\nvar isHelper = helpersCore._makeLogicHelper(\"eq\", function eqHelper(args){\n\tvar curValue, lastValue;\n\tfor (var i = 0; i < args.length; i++) {\n\t\tcurValue = helpersCore.resolve(args[i]);\n\t\tcurValue = typeof curValue === \"function\" ? curValue() : curValue;\n\n\t\tif (i > 0) {\n\t\t\tif (curValue !== lastValue) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tlastValue = curValue;\n\t}\n\treturn true;\n});\n\nvar andHelper = helpersCore._makeLogicHelper(\"and\", function andHelper(args){\n\tif(args.length === 0 ) {\n\t\treturn false;\n\t}\n\tvar last;\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tlast = helpersCore.resolve(args[i]);\n\t\tif( !last ) {\n\t\t\treturn last;\n\t\t}\n\t}\n\treturn last;\n});\n\nvar orHelper = helpersCore._makeLogicHelper(\"or\", function orHelper(args){\n\tif(args.length === 0 ) {\n\t\treturn false;\n\t}\n\tvar last;\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tlast = helpersCore.resolve(args[i]);\n\t\tif( last ) {\n\t\t\treturn last;\n\t\t}\n\t}\n\treturn last;\n});\n\n\nvar switchHelper = function(expression, options){\n\thelpersCore.resolve(expression);\n\tvar found = false;\n\n\tvar caseHelper = function(value, options) {\n\t\tif(!found && helpersCore.resolve(expression) === helpersCore.resolve(value)) {\n\t\t\tfound = true;\n\t\t\treturn options.fn(options.scope);\n\t\t}\n\t};\n\tcaseHelper.requiresOptionsArgument = true;\n\n\t// create default helper as a value-like function\n\t// so that either {{#default}} or {{#default()}} will work\n\tvar defaultHelper = function(options) {\n\t\tif (!found) {\n\t\t\treturn options ? options.scope.peek('this') : true;\n\t\t}\n\t};\n\tdefaultHelper.requiresOptionsArgument = true;\n\tcanReflect_1_19_2_canReflect.assignSymbols(defaultHelper, {\n\t\t\"can.isValueLike\": true,\n\t\t\"can.isFunctionLike\": false,\n\t\t\"can.getValue\": function() {\n\t\t\t// pass the helperOptions passed to {{#switch}}\n\t\t\treturn this(options);\n\t\t}\n\t});\n\n\tvar newScope = options.scope.add({\n\t\tcase: caseHelper,\n\t\tdefault: defaultHelper\n\t}, { notContext: true });\n\n\treturn options.fn(newScope, options);\n};\nswitchHelper.requiresOptionsArgument = true;\n\n\n// ## ODD HELPERS\n\nvar domDataHelper = function(attr, value) {\n\tvar data = (helpersCore.looksLikeOptions(value) ? value.context : value) || this;\n\treturn function setDomData(el) {\n\t\tcanDomData_1_0_3_canDomData.set( el, attr, data );\n\t};\n};\n\nvar joinBaseHelper = function(firstExpr/* , expr... */){\n\tvar args = [].slice.call(arguments);\n\tvar options = args.pop();\n\n\tvar moduleReference = args.map( function(expr){\n\t\tvar value = helpersCore.resolve(expr);\n\t\treturn typeof value === \"function\" ? value() : value;\n\t}).join(\"\");\n\n\tvar templateModule = canReflect_1_19_2_canReflect.getKeyValue(options.scope.templateContext.helpers, 'module');\n\tvar parentAddress = templateModule ? templateModule.uri: undefined;\n\n\tvar isRelative = moduleReference[0] === \".\";\n\n\tif(isRelative && parentAddress) {\n\t\treturn canJoinUris_1_2_0_canJoinUris(parentAddress, moduleReference);\n\t} else {\n\t\tvar baseURL = (typeof System !== \"undefined\" &&\n\t\t\t(System.renderingBaseURL || System.baseURL)) ||\tbaseUrl();\n\n\t\t// Make sure one of them has a needed /\n\t\tif(moduleReference[0] !== \"/\" && baseURL[baseURL.length - 1] !== \"/\") {\n\t\t\tbaseURL += \"/\";\n\t\t}\n\n\t\treturn canJoinUris_1_2_0_canJoinUris(baseURL, moduleReference);\n\t}\n};\njoinBaseHelper.requiresOptionsArgument = true;\n\n// ## LEGACY HELPERS\n\n// ### each\nvar eachHelper = function(items) {\n\tvar args = [].slice.call(arguments),\n\t\toptions = args.pop(),\n\t\thashExprs = options.exprData.hashExprs,\n\t\tresolved = helpersCore.bindAndRead(items),\n\t\thashOptions,\n\t\taliases;\n\n\t// Check if using hash\n\tif (canReflect_1_19_2_canReflect.size(hashExprs) > 0) {\n\t\thashOptions = {};\n\t\tcanReflect_1_19_2_canReflect.eachKey(hashExprs, function (exprs, key) {\n\t\t\thashOptions[exprs.key] = key;\n\t\t});\n\t}\n\n\tif ((\n\t\tcanReflect_1_19_2_canReflect.isObservableLike(resolved) && canReflect_1_19_2_canReflect.isListLike(resolved) ||\n\t\t\t( canReflect_1_19_2_canReflect.isListLike(resolved) && canReflect_1_19_2_canReflect.isValueLike(items) )\n\t) && !options.stringOnly) {\n\t\t// Tells that a helper has been called, this function should be returned through\n\t\t// checking its value.\n\t\toptions.metadata.rendered = true;\n\t\treturn function(el){\n\t\t\tvar cb = function (item, index) {\n\t\t\t\tvar aliases = {};\n\n\t\t\t\tif (canReflect_1_19_2_canReflect.size(hashOptions) > 0) {\n\t\t\t\t\tif (hashOptions.value) {\n\t\t\t\t\t\taliases[hashOptions.value] = item;\n\t\t\t\t\t}\n\t\t\t\t\tif (hashOptions.index) {\n\t\t\t\t\t\taliases[hashOptions.index] = index;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn options.fn(\n\t\t\t\t\toptions.scope\n\t\t\t\t\t.add(aliases, { notContext: true })\n\t\t\t\t\t.add({ index: index }, { special: true })\n\t\t\t\t\t.add(item),\n\t\t\t\toptions.options\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tcanViewLive_5_0_5_canViewLive.list(el, items, cb, options.context , function(list){\n\t\t\t\treturn options.inverse(options.scope.add(list), options.options);\n\t\t\t});\n\t\t};\n\t}\n\n\tvar expr = helpersCore.resolve(items),\n\t\tresult;\n\n\tif (!!expr && canReflect_1_19_2_canReflect.isListLike(expr)) {\n\t\tresult = utils$1.getItemsFragContent(expr, options, options.scope);\n\t\treturn options.stringOnly ? result.join('') : result;\n\t} else if (canReflect_1_19_2_canReflect.isObservableLike(expr) && canReflect_1_19_2_canReflect.isMapLike(expr) || expr instanceof Object) {\n\t\tresult = [];\n\t\tcanReflect_1_19_2_canReflect.each(expr, function(val, key){\n\t\t\tvar value = new keyObservable(expr, key);\n\t\t\taliases = {};\n\n\t\t\tif (canReflect_1_19_2_canReflect.size(hashOptions) > 0) {\n\t\t\t\tif (hashOptions.value) {\n\t\t\t\t\taliases[hashOptions.value] = value;\n\t\t\t\t}\n\t\t\t\tif (hashOptions.key) {\n\t\t\t\t\taliases[hashOptions.key] = key;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.push(options.fn(\n\t\t\t\toptions.scope\n\t\t\t\t.add(aliases, { notContext: true })\n\t\t\t\t.add({ key: key }, { special: true })\n\t\t\t\t.add(value)\n\t\t\t));\n\t\t});\n\n\t\treturn options.stringOnly ? result.join('') : result;\n\t}\n};\neachHelper.isLiveBound = true;\neachHelper.requiresOptionsArgument = true;\neachHelper.ignoreArgLookup = function ignoreArgLookup(index) {\n\treturn index === 1;\n};\n\n// ### index\n// This is legacy for `{{index(5)}}`\nvar indexHelper = canAssign_1_3_3_canAssign(function indexHelper(offset, options) {\n\tif (!options) {\n\t\toptions = offset;\n\t\toffset = 0;\n\t}\n\tvar index = options.scope.peek(\"scope.index\");\n\treturn \"\"+((typeof(index) === \"function\" ? index() : index) + offset);\n}, {requiresOptionsArgument: true});\n\n// ### WITH HELPER\nvar withHelper = function (expr, options) {\n\tvar ctx = expr;\n\tif(!options) {\n\t\t// hash-only case if no current context expression\n\t\toptions = expr;\n\t\texpr = true;\n\t\tctx = options.hash;\n\t} else {\n\t\texpr = helpersCore.resolve(expr);\n\t\tif(options.hash && canReflect_1_19_2_canReflect.size(options.hash) > 0) {\n\t\t\t// presumably rare case of both a context object AND hash keys\n\t\t\t// Leaving it undocumented for now, but no reason not to support it.\n\t\t\tctx = options.scope.add(options.hash, { notContext: true }).add(ctx);\n\t\t}\n\t}\n\treturn options.fn(ctx || {});\n};\nwithHelper.requiresOptionsArgument = true;\n\n// ### data helper\nvar dataHelper = function(attr, value) {\n\tvar data = (helpersCore.looksLikeOptions(value) ? value.context : value) || this;\n\treturn function setData(el) {\n\t\t//!steal-remove-start\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tdev.warn('The {{data}} helper has been deprecated; use {{domData}} instead: https://canjs.com/doc/can-stache.helpers.domData.html');\n\t\t}\n\t\t//!steal-remove-end\n\t\tcanDomData_1_0_3_canDomData.set( el, attr, data );\n\t};\n};\n\n// ## UNLESS HELPER\nvar unlessHelper = function (expr, options) {\n\tif(!options) {\n\t\treturn !ifHelper.apply(this, [expr]);\n\t}\n\treturn ifHelper.apply(this, [expr, canAssign_1_3_3_canAssign(canAssign_1_3_3_canAssign({}, options), {\n\t\tfn: options.inverse,\n\t\tinverse: options.fn\n\t})]);\n};\nunlessHelper.requiresOptionsArgument = true;\nunlessHelper.isLiveBound = true;\n\n\n// ## Converters\n// ## NOT converter\nvar notConverter = {\n\tget: function(obs, options){\n\t\tif(helpersCore.looksLikeOptions(options)) {\n\t\t\treturn canReflect_1_19_2_canReflect.getValue(obs) ? options.inverse() : options.fn();\n\t\t} else {\n\t\t\treturn !canReflect_1_19_2_canReflect.getValue(obs);\n\t\t}\n\t},\n\tset: function(newVal, obs){\n\t\tcanReflect_1_19_2_canReflect.setValue(obs, !newVal);\n\t}\n};\n\n// ## Register as defaults\n\ncanAssign_1_3_3_canAssign(builtInHelpers, {\n\t'debugger': debuggerHelper$1,\n\teach: eachHelper,\n\teachOf: eachHelper,\n\tindex: indexHelper,\n\t'if': ifHelper,\n\tis: isHelper,\n\teq: isHelper,\n\tunless: unlessHelper,\n\t'with': withHelper,\n\tconsole: console,\n\tdata: dataHelper,\n\tdomData: domDataHelper,\n\t'switch': switchHelper,\n\tjoinBase: joinBaseHelper,\n\tand: andHelper,\n\tor: orHelper,\n\t'let': Let,\n\t'for': ForOf,\n\tportal: Portal\n});\n\ncanAssign_1_3_3_canAssign(builtInConverters, {\n\t'not': notConverter\n});\n\n// add all the built-in helpers when stache is loaded\nhelpersCore.addBuiltInHelpers();\nhelpersCore.addBuiltInConverters();\n\nvar core$1 = helpersCore;\n\nvar mustacheLineBreakRegExp$1 = /(?:(^|\\r?\\n)(\\s*)(\\{\\{([\\s\\S]*)\\}\\}\\}?)([^\\S\\n\\r]*)($|\\r?\\n))|(\\{\\{([\\s\\S]*)\\}\\}\\}?)/g,\n\tmustacheWhitespaceRegExp$1 = /(\\s*)(\\{\\{\\{?)(-?)([\\s\\S]*?)(-?)(\\}\\}\\}?)(\\s*)/g;\n\nfunction splitModeFromExpression$1(expression, state){\n\texpression = expression.trim();\n\tvar mode = expression.charAt(0);\n\n\tif( \"#/{&^>!<\".indexOf(mode) >= 0 ) {\n\t\texpression = expression.substr(1).trim();\n\t} else {\n\t\tmode = null;\n\t}\n\t// Triple braces do nothing within a tag.\n\tif(mode === \"{\" && state.node) {\n\t\tmode = null;\n\t}\n\treturn {\n\t\tmode: mode,\n\t\texpression: expression\n\t};\n}\n\nfunction cleanLineEndings(template) {\n\t\t// Finds mustache tags with space around them or no space around them.\n\t\treturn template.replace( mustacheLineBreakRegExp$1,\n\t\t\tfunction(whole,\n\t\t\t\treturnBefore,\n\t\t\t\tspaceBefore,\n\t\t\t\tspecial,\n\t\t\t\texpression,\n\t\t\t\tspaceAfter,\n\t\t\t\treturnAfter,\n\t\t\t\t// A mustache magic tag that has no space around it.\n\t\t\t\tspaceLessSpecial,\n\t\t\t\tspaceLessExpression,\n\t\t\t\tmatchIndex){\n\n\t\t\t// IE 8 will provide undefined\n\t\t\tspaceAfter = (spaceAfter || \"\");\n\t\t\treturnBefore = (returnBefore || \"\");\n\t\t\tspaceBefore = (spaceBefore || \"\");\n\n\t\t\tvar modeAndExpression = splitModeFromExpression$1(expression || spaceLessExpression,{});\n\n\t\t\t// If it's a partial or tripple stache, leave in place.\n\t\t\tif(spaceLessSpecial || \">{\".indexOf( modeAndExpression.mode) >= 0) {\n\t\t\t\treturn whole;\n\t\t\t} else if( \"^#!/\".indexOf( modeAndExpression.mode ) >= 0 ) {\n\t\t\t\t// Return the magic tag and a trailing linebreak if this did not\n\t\t\t\t// start a new line and there was an end line.\n\t\t\t\t// Add a normalized leading space, if there was any leading space, in case this abuts a tag name\n\t\t\t\tspaceBefore = (returnBefore + spaceBefore) && \" \";\n\t\t\t\treturn spaceBefore+special+( matchIndex !== 0 && returnAfter.length ? returnBefore+\"\\n\" :\"\");\n\n\n\t\t\t} else {\n\t\t\t\t// There is no mode, return special with spaces around it.\n\t\t\t\treturn spaceBefore+special+spaceAfter+(spaceBefore.length || matchIndex !== 0 ? returnBefore+\"\\n\" : \"\");\n\t\t\t}\n\t\t});\n}\n\nfunction whiteSpaceReplacement(\n\twhole,\n\tspaceBefore,\n\tbracketBefore,\n\tcontrolBefore,\n\texpression,\n\tcontrolAfter,\n\tbracketAfter,\n\tspaceAfter\n) {\n\n\tif (controlBefore === '-') {\n\t\tspaceBefore = '';\n\t}\n\n\tif (controlAfter === '-') {\n\t\tspaceAfter = '';\n\t}\n\n\treturn spaceBefore + bracketBefore + expression + bracketAfter + spaceAfter;\n}\n\nfunction cleanWhitespaceControl(template) {\n\treturn template.replace(mustacheWhitespaceRegExp$1, whiteSpaceReplacement);\n}\n\nvar cleanLineEndings_1 = cleanLineEndings;\nvar cleanWhitespaceControl_1 = cleanWhitespaceControl;\n\nvar canStacheAst_1_1_0_controls = {\n\tcleanLineEndings: cleanLineEndings_1,\n\tcleanWhitespaceControl: cleanWhitespaceControl_1\n};\n\nvar parse = function(filename, source){\n\tif (arguments.length === 1) {\n\t\tsource = arguments[0];\n\t\tfilename = undefined;\n\t}\n\n\tvar template = source;\n\ttemplate = canStacheAst_1_1_0_controls.cleanWhitespaceControl(template);\n\ttemplate = canStacheAst_1_1_0_controls.cleanLineEndings(template);\n\n\tvar imports = [],\n\t\tdynamicImports = [],\n\t\timportDeclarations = [],\n\t\tases = {},\n\t\tattributes = new Map(),\n\t\tinImport = false,\n\t\tinFrom = false,\n\t\tinAs = false,\n\t\tisUnary = false,\n\t\timportIsDynamic = false,\n\t\tcurrentAs = \"\",\n\t\tcurrentFrom = \"\",\n\t\tcurrentAttrName = null;\n\n\tfunction processImport(line) {\n\t\tif(currentAs) {\n\t\t\tases[currentAs] = currentFrom;\n\t\t\tcurrentAs = \"\";\n\t\t}\n\t\tif(importIsDynamic) {\n\t\t\tdynamicImports.push(currentFrom);\n\t\t} else {\n\t\t\timports.push(currentFrom);\n\t\t}\n\t\timportDeclarations.push({\n\t\t\tspecifier: currentFrom,\n\t\t\tloc: {\n\t\t\t\tline: line\n\t\t\t},\n\t\t\tattributes: attributes\n\t\t});\n\n\t\t// Reset this scope value so that the next import gets new attributes.\n\t\tattributes = new Map();\n\t}\n\n\tvar program = canViewParser_4_1_3_canViewParser(template, {\n\t\tfilename: filename,\n\t\tstart: function( tagName, unary ){\n\t\t\tif(tagName === \"can-import\") {\n\t\t\t\tisUnary = unary;\n\t\t\t\timportIsDynamic = false; // assume static import unless there is content (chars/tags/special).\n\t\t\t\tinImport = true;\n\t\t\t} else if(tagName === \"can-dynamic-import\") {\n\t\t\t\tisUnary = unary;\n\t\t\t\timportIsDynamic = true;\n\t\t\t\tinImport = true;\n\t\t\t} else if(inImport) {\n\t\t\t\timportIsDynamic = true; // found content inside can-import tag.\n\t\t\t\tinImport = false;\n\t\t\t}\n\t\t},\n\t\tattrStart: function( attrName ){\n\t\t\tcurrentAttrName = attrName;\n\t\t\t// Default to a boolean attribute, the attrValue hook will replace that.\n\t\t\tattributes.set(currentAttrName, true);\n\n\t\t\tif(attrName === \"from\") {\n\t\t\t\tinFrom = true;\n\t\t\t} else if(attrName === \"as\" || attrName === \"export-as\") {\n\t\t\t\tinAs = true;\n\t\t\t}\n\t\t},\n\t\tattrEnd: function( attrName ){\n\t\t\tif(attrName === \"from\") {\n\t\t\t\tinFrom = false;\n\t\t\t} else if(attrName === \"as\" || attrName === \"export-as\") {\n\t\t\t\tinAs = false;\n\t\t\t}\n\t\t},\n\t\tattrValue: function( value ){\n\t\t\tif(inImport) {\n\t\t\t\tattributes.set(currentAttrName, value);\n\t\t\t}\n\t\t\tif(inFrom && inImport) {\n\t\t\t\tcurrentFrom = value;\n\t\t\t} else if(inAs && inImport) {\n\t\t\t\tcurrentAs = value;\n\t\t\t}\n\t\t},\n\t\tend: function(tagName, unary, line){\n\t\t\tif((tagName === \"can-import\" || tagName === \"can-dynamic-import\") && isUnary) {\n\t\t\t\tprocessImport(line);\n\t\t\t}\n\t\t},\n\t\tclose: function(tagName, unary, line){\n\t\t\tif((tagName === \"can-import\" || tagName === \"can-dynamic-import\")) {\n\t\t\t\tprocessImport(line);\n\t\t\t}\n\t\t},\n\t\tchars: function(text) {\n\t\t\tif(text.trim().length > 0) {\n\t\t\t\timportIsDynamic = true;\n\t\t\t}\n\t\t},\n\t\tspecial: function() {\n\t\t\timportIsDynamic = true;\n\t\t}\n\t}, true);\n\n\treturn {\n\t\tintermediate: program,\n\t\tprogram: program,\n\t\timports: imports,\n\t\tdynamicImports: dynamicImports,\n\t\timportDeclarations: importDeclarations,\n\t\tases: ases,\n\t\texports: ases\n\t};\n};\n\nvar canStacheAst_1_1_0_canStacheAst = {\n\tparse: parse\n};\n\nvar global$2 = global_1();\n\nvar stealOptimized = function(moduleName, parentName){\n\tif (typeof global$2.stealRequire !== \"undefined\") {\n\t\treturn steal.import(moduleName, { name: parentName });\n\t}\n};\n\nvar global$3 = global_1();\n\nfunction isFunction$1(fn) {\n\treturn typeof fn === \"function\";\n}\n// since stealJS uses a SystemJS fork and SystemJS is exposed globally we can use this loader for SystemJS or stealJS\nvar system = function(moduleName, parentName) {\n\tif(typeof global$3.System === \"object\" && isFunction$1(global$3.System[\"import\"])) {\n\t\treturn global$3.System[\"import\"](moduleName, {\n\t\t\tname: parentName\n\t\t});\n\t}\n};\n\nvar es6 = createCommonjsModule(function (module) {\n// check for `noModule` in HTMLScriptElement. if its present, then the browser can handle dynamic loading because if\n// HTMLScriptElement.noModule is `true` the browser used to run fallback scripts in older browsers that do not support JavaScript modules\nif (\"HTMLScriptElement\" in global_1() && \"noModule\" in HTMLScriptElement.prototype) {\n\t// \"import()\" is a syntax error on some platforms and will cause issues if this module is bundled\n\t// into a larger script bundle, so only eval it to code if the platform is known to support it.\n\tmodule.exports = new Function(\n\t\t\"moduleName\",\n\t\t// if moduleName has no extension, treat it as a javascript file and add .js extension\n\t\t\"if (!(moduleName.match(/[^\\\\\\\\\\\\/]\\\\.([^.\\\\\\\\\\\\/]+)$/) || [null]).pop()) {\\n\" +\n\t\t\t\"moduleName += '.js';\\n\" +\n\t\t\"}\\n\" +\n\t\t\"return import(moduleName.replace(/['\\\"]+/g, ''));\\n\"\n\t);\n} else {\n\tmodule.exports = function() {};\n}\n});\n\nvar node$1 = function(moduleName) {\n\tif (isNode()) {\n\t\treturn Promise.resolve(commonjsRequire(moduleName));\n\t}\n};\n\nvar global$4 = global_1();\n\n// AMD loader\nvar require = function(moduleName){\n\tif(global$4.define && global$4.define.amd){\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tglobal$4.require([moduleName], function(value){\n\t\t\t\tresolve(value);\n\t\t\t});\n\t\t});\n\t}\n};\n\n/**\n * @module {function} can-util/js/import/import import\n * @parent can-util/js\n * @signature `importModule(moduleName, parentName)`\n * @hide\n *\n * ```js\n * var importModule = require(\"can-util/js/import/import\");\n *\n * importModule(\"foo.stache\").then(function(){\n * // module was imported\n * });\n * ```\n *\n * @param {String} moduleName The module to be imported.\n * @param {String} [parentName] A parent module that will be used as a reference for resolving relative module imports.\n * @return {Promise} A Promise that will resolve when the module has been imported.\n */\n\n// array of loader functions, last in first out\nvar loader = [];\n\n/**\n * add a loader-function to the list of loader\n * the function should return a promise that resolves when the module has been loaded\n * otherwise the loader function should return null or undefined\n * \n * @signature `import.addLoader(loader)`\n * @param fn callable\n */\nfunction addLoader(fn){\n\tif(typeof fn === \"function\"){\n\t\tloader.push(fn);\n\t}\n}\n\n/**\n * clear the list of loaders\n */\nfunction flushLoader(){\n\tloader = [];\n}\n\n/**\n * a bunch of presets that can be used in a certain environment \n * \n * @param preset string\n */\nfunction preset(preset){\n\tflushLoader();\n\t\n\tswitch (preset){\n\t\tcase \"stealjs\":\n\t\t\taddLoader(stealOptimized);\n\t\t\taddLoader(system);\n\t\t\tbreak;\n\t\tcase \"ES2020\":\n\t\tcase \"es2020\":\n\t\tcase \"dynamic-import\":\n\t\t\taddLoader(es6);\n\t\t\tbreak;\n\t\tcase \"node\":\n\t\t\taddLoader(node$1);\n\t\t\tbreak;\n\t\tcase \"all\":\n\t\tdefault:\n\t\t\taddLoader(stealOptimized);\n\t\t\taddLoader(es6);\n\t\t\taddLoader(node$1);\n\t\t\taddLoader(require);\n\t\t\taddLoader(system);\n\t\t\tbreak;\n\t}\n}\n\n// by default, add all available loaders to the list\npreset('all');\n\nvar canImportModule_1_3_2_canImportModule = canNamespace_1_0_0_canNamespace.import = function(moduleName, parentName) {\n\treturn new Promise(function(resolve, reject) {\n\t\ttry {\n\t\t\tvar loaderPromise;\n\t\t\t// last added loader will be called first\n\t\t\tfor (var i = loader.length - 1; i >= 0; i--) {\n\t\t\t\tloaderPromise = loader[i](moduleName, parentName);\n\t\t\t\tif (loaderPromise) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(loaderPromise){\n\t\t\t\tloaderPromise.then(resolve, reject);\n\t\t\t}else{\n\t\t\t\treject(\"no proper module-loader available\");\n\t\t\t}\n\t\t} catch(err) {\n\t\t\treject(err);\n\t\t}\n\t});\n};\nvar addLoader_1 = addLoader;\nvar flushLoader_1 = flushLoader;\nvar preset_1 = preset;\ncanImportModule_1_3_2_canImportModule.addLoader = addLoader_1;\ncanImportModule_1_3_2_canImportModule.flushLoader = flushLoader_1;\ncanImportModule_1_3_2_canImportModule.preset = preset_1;\n\n/* jshint undef: false */\n\n\n\n\n\n\n\n\nvar getIntermediateAndImports = canStacheAst_1_1_0_canStacheAst.parse;\n\nvar makeRendererConvertScopes = utils$1.makeRendererConvertScopes;\nvar last$2 = utils$1.last;\n\n\n\n\n\n\n\n\n\n\n\n\n// Make sure that we can also use our modules with Stache as a plugin\n\n\n\n\nif(!canViewCallbacks_5_0_0_canViewCallbacks.tag(\"content\")) {\n\t// This was moved from the legacy view/scanner.js to here.\n\t// This makes sure content elements will be able to have a callback.\n\tcanViewCallbacks_5_0_0_canViewCallbacks.tag(\"content\", function(el, tagData) {\n\t\treturn tagData.scope;\n\t});\n}\n\nvar isViewSymbol$2 = canSymbol_1_7_0_canSymbol.for(\"can.isView\");\n\nvar wrappedAttrPattern = /[{(].*[)}]/;\nvar colonWrappedAttrPattern = /^on:|(:to|:from|:bind)$|.*:to:on:.*/;\nvar svgNamespace = \"http://www.w3.org/2000/svg\",\nxmlnsAttrNamespaceURI$1 = \"http://www.w3.org/2000/xmlns/\",\nxlinkHrefAttrNamespaceURI$1 = \"http://www.w3.org/1999/xlink\";\nvar namespaces = {\n\t\"svg\": svgNamespace,\n\t// this allows a partial to start with g.\n\t\"g\": svgNamespace,\n\t\"defs\": svgNamespace,\n\t\"path\": svgNamespace,\n\t\"filter\": svgNamespace,\n\t\"feMorphology\": svgNamespace,\n\t\"feGaussianBlur\": svgNamespace,\n\t\"feOffset\": svgNamespace,\n\t\"feComposite\": svgNamespace,\n\t\"feColorMatrix\": svgNamespace,\n\t\"use\": svgNamespace\n},\n\tattrsNamespacesURI$1 = {\n\t\t'xmlns': xmlnsAttrNamespaceURI$1,\n\t\t'xlink:href': xlinkHrefAttrNamespaceURI$1\n\t},\n\ttextContentOnlyTag = {style: true, script: true};\n\nfunction stache (filename, template) {\n\tif (arguments.length === 1) {\n\t\ttemplate = arguments[0];\n\t\tfilename = undefined;\n\t}\n\n\tvar inlinePartials = {};\n\n\t// Remove line breaks according to mustache's specs.\n\tif(typeof template === \"string\") {\n\t\ttemplate = mustache_core.cleanWhitespaceControl(template);\n\t\ttemplate = mustache_core.cleanLineEndings(template);\n\t}\n\n\t// The HTML section that is the root section for the entire template.\n\tvar section = new html_section(filename),\n\t\t// Tracks the state of the parser.\n\t\tstate = {\n\t\t\tnode: null,\n\t\t\tattr: null,\n\t\t\t// A stack of which node / section we are in.\n\t\t\t// There is probably a better way of doing this.\n\t\t\tsectionElementStack: [],\n\t\t\t// If text should be inserted and HTML escaped\n\t\t\ttext: false,\n\t\t\t// which namespace we are in\n\t\t\tnamespaceStack: [],\n\t\t\t// for style and script tags\n\t\t\t// we create a special TextSectionBuilder and add things to that\n\t\t\t// when the element is done, we compile the text section and\n\t\t\t// add it as a callback to `section`.\n\t\t\ttextContentOnly: null\n\n\t\t},\n\n\t\t// This function is a catch all for taking a section and figuring out\n\t\t// how to create a \"renderer\" that handles the functionality for a\n\t\t// given section and modify the section to use that renderer.\n\t\t// For example, if an HTMLSection is passed with mode `#` it knows to\n\t\t// create a liveBindingBranchRenderer and pass that to section.add.\n\t\t// jshint maxdepth:5\n\t\tmakeRendererAndUpdateSection = function(section, mode, stache, lineNo){\n\n\t\t\tif(mode === \">\") {\n\t\t\t\t// Partials use liveBindingPartialRenderers\n\t\t\t\tsection.add(mustache_core.makeLiveBindingPartialRenderer(stache, copyState({ filename: section.filename, lineNo: lineNo })));\n\n\t\t\t} else if(mode === \"/\") {\n\n\t\t\t\tvar createdSection = section.last();\n\t\t\t\tif ( createdSection.startedWith === \"<\" ) {\n\t\t\t\t\tinlinePartials[ stache ] = section.endSubSectionAndReturnRenderer();\n\t\t\t\t\t// Remove *TWO* nodes because we now have a start and an end comment for the section....\n\t\t\t\t\tsection.removeCurrentNode();\n\t\t\t\t\tsection.removeCurrentNode();\n\t\t\t\t} else {\n\t\t\t\t\tsection.endSection();\n\t\t\t\t}\n\n\t\t\t\t// to avoid \"Blocks are nested too deeply\" when linting\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tif(section instanceof html_section) {\n\t\t\t\t\t\tvar last = state.sectionElementStack[state.sectionElementStack.length - 1];\n\t\t\t\t\t\tif (last.tag && last.type === \"section\" && stache !== \"\" && stache !== last.tag) {\n\t\t\t\t\t\t\tif (filename) {\n\t\t\t\t\t\t\t\tdev.warn(filename + \":\" + lineNo + \": unexpected closing tag {{/\" + stache + \"}} expected {{/\" + last.tag + \"}}\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdev.warn(lineNo + \": unexpected closing tag {{/\" + stache + \"}} expected {{/\" + last.tag + \"}}\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\n\t\t\t\tif(section instanceof html_section) {\n\t\t\t\t\tstate.sectionElementStack.pop();\n\t\t\t\t}\n\t\t\t} else if(mode === \"else\") {\n\n\t\t\t\tsection.inverse();\n\n\t\t\t} else {\n\n\t\t\t\t// If we are an HTMLSection, we will generate a\n\t\t\t\t// a LiveBindingBranchRenderer; otherwise, a StringBranchRenderer.\n\t\t\t\t// A LiveBindingBranchRenderer function processes\n\t\t\t\t// the mustache text, and sets up live binding if an observable is read.\n\t\t\t\t// A StringBranchRenderer function processes the mustache text and returns a\n\t\t\t\t// text value.\n\t\t\t\tvar makeRenderer = section instanceof html_section ?\n\t\t\t\t\tmustache_core.makeLiveBindingBranchRenderer:\n\t\t\t\t\tmustache_core.makeStringBranchRenderer;\n\n\t\t\t\tif(mode === \"{\" || mode === \"&\") {\n\n\t\t\t\t\t// Adds a renderer function that just reads a value or calls a helper.\n\t\t\t\t\tsection.add(makeRenderer(null,stache, copyState({ filename: section.filename, lineNo: lineNo })));\n\n\t\t\t\t} else if(mode === \"#\" || mode === \"^\" || mode === \"<\") {\n\t\t\t\t\t// Adds a renderer function and starts a section.\n\t\t\t\t\tvar renderer = makeRenderer(mode, stache, copyState({ filename: section.filename, lineNo: lineNo }));\n\t\t\t\t\tvar sectionItem = {\n\t\t\t\t\t\ttype: \"section\"\n\t\t\t\t\t};\n\t\t\t\t\tsection.startSection(renderer, stache);\n\t\t\t\t\tsection.last().startedWith = mode;\n\n\t\t\t\t\t// If we are a directly nested section, count how many we are within\n\t\t\t\t\tif(section instanceof html_section) {\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tvar tag = typeof renderer.exprData.closingTag === 'function' ?\n\t\t\t\t\t\t\t\trenderer.exprData.closingTag() : stache;\n\t\t\t\t\t\t\tsectionItem.tag = tag;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\n\t\t\t\t\t\tstate.sectionElementStack.push(sectionItem);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Adds a renderer function that only updates text.\n\t\t\t\t\tsection.add(makeRenderer(null, stache, copyState({text: true, filename: section.filename, lineNo: lineNo })));\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\t\tisDirectlyNested = function() {\n\t\t\tvar lastElement = state.sectionElementStack[state.sectionElementStack.length - 1];\n\t\t\treturn state.sectionElementStack.length ?\n\t\t\t\tlastElement.type === \"section\" || lastElement.type === \"custom\": true;\n\t\t},\n\t\t// Copys the state object for use in renderers.\n\t\tcopyState = function(overwrites){\n\n\t\t\tvar cur = {\n\t\t\t\ttag: state.node && state.node.tag,\n\t\t\t\tattr: state.attr && state.attr.name,\n\t\t\t\t// elements should be considered direclty nested\n\t\t\t\tdirectlyNested: isDirectlyNested(),\n\t\t\t\ttextContentOnly: !!state.textContentOnly\n\t\t\t};\n\t\t\treturn overwrites ? canAssign_1_3_3_canAssign(cur, overwrites) : cur;\n\t\t},\n\t\taddAttributesCallback = function(node, callback){\n\t\t\tif( !node.attributes ) {\n\t\t\t\tnode.attributes = [];\n\t\t\t}\n\t\t\tnode.attributes.unshift(callback);\n\t\t};\n\n\tcanViewParser_4_1_3_canViewParser(template, {\n\t\tfilename: filename,\n\t\tstart: function(tagName, unary, lineNo){\n\t\t\tvar matchedNamespace = namespaces[tagName];\n\n\t\t\tif (matchedNamespace && !unary ) {\n\t\t\t\tstate.namespaceStack.push(matchedNamespace);\n\t\t\t}\n\n\t\t\t// either add templates: {} here or check below and decorate\n\t\t\t// walk up the stack/targetStack until you find the first node\n\t\t\t// with a templates property, and add the popped renderer\n\t\t\tstate.node = {\n\t\t\t\ttag: tagName,\n\t\t\t\tchildren: [],\n\t\t\t\tnamespace: matchedNamespace || last$2(state.namespaceStack)\n\t\t\t};\n\t\t},\n\t\tend: function(tagName, unary, lineNo){\n\t\t\tvar isCustomTag = canViewCallbacks_5_0_0_canViewCallbacks.tag(tagName);\n\t\t\tvar directlyNested = isDirectlyNested();\n\t\t\tif(unary){\n\t\t\t\t// If it's a custom tag with content, we need a section renderer.\n\t\t\t\tsection.add(state.node);\n\t\t\t\tif(isCustomTag) {\n\t\t\t\t\t// Call directlyNested now as it's stateful.\n\t\t\t\t\taddAttributesCallback(state.node, function(scope){\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tscope.set('scope.lineNumber', lineNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\tcanViewCallbacks_5_0_0_canViewCallbacks.tagHandler(this,tagName, {\n\t\t\t\t\t\t\tscope: scope,\n\t\t\t\t\t\t\tsubtemplate: null,\n\t\t\t\t\t\t\ttemplateType: \"stache\",\n\t\t\t\t\t\t\tdirectlyNested: directlyNested\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsection.push(state.node);\n\n\t\t\t\tstate.sectionElementStack.push({\n\t\t\t\t\ttype: isCustomTag ? \"custom\" : null,\n\t\t\t\t\ttag: isCustomTag ? null : tagName,\n\t\t\t\t\ttemplates: {},\n\t\t\t\t\tdirectlyNested: directlyNested\n\t\t\t\t});\n\n\t\t\t\t// If it's a custom tag with content, we need a section renderer.\n\t\t\t\tif( isCustomTag ) {\n\t\t\t\t\tsection.startSubSection();\n\t\t\t\t} else if(textContentOnlyTag[tagName]) {\n\t\t\t\t\tstate.textContentOnly = new text_section(filename);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tstate.node =null;\n\n\t\t},\n\t\tclose: function(tagName, lineNo) {\n\t\t\tvar matchedNamespace = namespaces[tagName];\n\n\t\t\tif (matchedNamespace ) {\n\t\t\t\tstate.namespaceStack.pop();\n\t\t\t}\n\n\t\t\tvar isCustomTag = canViewCallbacks_5_0_0_canViewCallbacks.tag(tagName),\n\t\t\t\trenderer;\n\n\t\t\tif( isCustomTag ) {\n\t\t\t\trenderer = section.endSubSectionAndReturnRenderer();\n\t\t\t}\n\n\t\t\tif(textContentOnlyTag[tagName]) {\n\t\t\t\tsection.last().add(state.textContentOnly.compile(copyState()));\n\t\t\t\tstate.textContentOnly = null;\n\t\t\t}\n\n\t\t\tvar oldNode = section.pop();\n\t\t\tif( isCustomTag ) {\n\t\t\t\tif (tagName === \"can-template\") {\n\t\t\t\t\t// If we find a can-template we want to go back 2 in the stack to get it's inner content\n\t\t\t\t\t// rather than the element itself\n\t\t\t\t\tvar parent = state.sectionElementStack[state.sectionElementStack.length - 2];\n\t\t\t\t\tif (renderer) {// Only add the renderer if the template has content\n\t\t\t\t\t\tparent.templates[oldNode.attrs.name] = makeRendererConvertScopes(renderer);\n\t\t\t\t\t}\n\t\t\t\t\tsection.removeCurrentNode();\n\t\t\t\t} else {\n\t\t\t\t\t// Get the last element in the stack\n\t\t\t\t\tvar current = state.sectionElementStack[state.sectionElementStack.length - 1];\n\t\t\t\t\taddAttributesCallback(oldNode, function(scope){\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tscope.set('scope.lineNumber', lineNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\tcanViewCallbacks_5_0_0_canViewCallbacks.tagHandler(this,tagName, {\n\t\t\t\t\t\t\tscope: scope,\n\t\t\t\t\t\t\tsubtemplate: renderer ? makeRendererConvertScopes(renderer) : renderer,\n\t\t\t\t\t\t\ttemplateType: \"stache\",\n\t\t\t\t\t\t\ttemplates: current.templates,\n\t\t\t\t\t\t\tdirectlyNested: current.directlyNested\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tstate.sectionElementStack.pop();\n\t\t},\n\t\tattrStart: function(attrName, lineNo){\n\t\t\tif(state.node.section) {\n\t\t\t\tstate.node.section.add(attrName+\"=\\\"\");\n\t\t\t} else {\n\t\t\t\tstate.attr = {\n\t\t\t\t\tname: attrName,\n\t\t\t\t\tvalue: \"\"\n\t\t\t\t};\n\t\t\t}\n\n\t\t},\n\t\tattrEnd: function(attrName, lineNo){\n\t\t\tvar matchedAttrNamespacesURI = attrsNamespacesURI$1[attrName];\n\t\t\tif(state.node.section) {\n\t\t\t\tstate.node.section.add(\"\\\" \");\n\t\t\t} else {\n\t\t\t\tif(!state.node.attrs) {\n\t\t\t\t\tstate.node.attrs = {};\n\t\t\t\t}\n\n\t\t\t\tif (state.attr.section) {\n\t\t\t\t\tstate.node.attrs[state.attr.name] = state.attr.section.compile(copyState());\n\t\t\t\t} else if (matchedAttrNamespacesURI) {\n\t\t\t\t\tstate.node.attrs[state.attr.name] = {\n\t\t\t\t\t\tvalue: state.attr.value,\n\t\t\t\t\t\tnamespaceURI: attrsNamespacesURI$1[attrName]\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tstate.node.attrs[state.attr.name] = state.attr.value;\n\t\t\t\t}\n\n\t\t\t\tvar attrCallback = canViewCallbacks_5_0_0_canViewCallbacks.attr(attrName);\n\n\t\t\t\t//!steal-remove-start\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tvar decodedAttrName = canAttributeEncoder_1_1_4_canAttributeEncoder.decode(attrName);\n\t\t\t\t\tvar weirdAttribute = !!wrappedAttrPattern.test(decodedAttrName) || !!colonWrappedAttrPattern.test(decodedAttrName);\n\t\t\t\t\tif (weirdAttribute && !attrCallback) {\n\t\t\t\t\t\tdev.warn(\"unknown attribute binding \" + decodedAttrName + \". Is can-stache-bindings imported?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//!steal-remove-end\n\n\t\t\t\tif(attrCallback) {\n\t\t\t\t\tif( !state.node.attributes ) {\n\t\t\t\t\t\tstate.node.attributes = [];\n\t\t\t\t\t}\n\t\t\t\t\tstate.node.attributes.push(function(scope){\n\t\t\t\t\t\t//!steal-remove-start\n\t\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\t\tscope.set('scope.lineNumber', lineNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//!steal-remove-end\n\t\t\t\t\t\tattrCallback(this,{\n\t\t\t\t\t\t\tattributeName: attrName,\n\t\t\t\t\t\t\tscope: scope\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tstate.attr = null;\n\t\t\t}\n\t\t},\n\t\tattrValue: function(value, lineNo){\n\t\t\tvar section = state.node.section || state.attr.section;\n\t\t\tif(section){\n\t\t\t\tsection.add(value);\n\t\t\t} else {\n\t\t\t\tstate.attr.value += value;\n\t\t\t}\n\t\t},\n\t\tchars: function(text, lineNo) {\n\t\t\t(state.textContentOnly || section).add(text);\n\t\t},\n\t\tspecial: function(text, lineNo){\n\t\t\tvar firstAndText = mustache_core.splitModeFromExpression(text, state),\n\t\t\t\tmode = firstAndText.mode,\n\t\t\t\texpression = firstAndText.expression;\n\n\n\t\t\tif(expression === \"else\") {\n\t\t\t\tvar inverseSection;\n\t\t\t\tif(state.attr && state.attr.section) {\n\t\t\t\t\tinverseSection = state.attr.section;\n\t\t\t\t} else if(state.node && state.node.section ) {\n\t\t\t\t\tinverseSection = state.node.section;\n\t\t\t\t} else {\n\t\t\t\t\tinverseSection = state.textContentOnly || section;\n\t\t\t\t}\n\t\t\t\tinverseSection.inverse();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(mode === \"!\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(state.node && state.node.section) {\n\n\t\t\t\tmakeRendererAndUpdateSection(state.node.section, mode, expression, lineNo);\n\n\t\t\t\tif(state.node.section.subSectionDepth() === 0){\n\t\t\t\t\tstate.node.attributes.push( state.node.section.compile(copyState()) );\n\t\t\t\t\tdelete state.node.section;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// `{{}}` in an attribute like `class=\"{{}}\"`\n\t\t\telse if(state.attr) {\n\n\t\t\t\tif(!state.attr.section) {\n\t\t\t\t\tstate.attr.section = new text_section(filename);\n\t\t\t\t\tif(state.attr.value) {\n\t\t\t\t\t\tstate.attr.section.add(state.attr.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmakeRendererAndUpdateSection(state.attr.section, mode, expression, lineNo);\n\n\t\t\t}\n\t\t\t// `{{}}` in a tag like `